From 747fb8214fb9e0eaecf165a3631d8eb68de65881 Mon Sep 17 00:00:00 2001 From: Addison Elliott Date: Sun, 3 Jul 2022 07:24:23 -0500 Subject: [PATCH 1/2] Remove sys.path.append from each unittest file This declaration is no longer necessary. --- nrrd/tests/test_formatting.py | 3 --- nrrd/tests/test_parsing.py | 2 -- nrrd/tests/test_reading.py | 2 -- 3 files changed, 7 deletions(-) diff --git a/nrrd/tests/test_formatting.py b/nrrd/tests/test_formatting.py index df6d615..9e3c3ea 100644 --- a/nrrd/tests/test_formatting.py +++ b/nrrd/tests/test_formatting.py @@ -6,9 +6,6 @@ import nrrd from nrrd.tests.util import * -# Required specifically in each module so that searches happen at the parent directory for importing modules -sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(__file__)))) - class TestFieldFormatting(unittest.TestCase): def setUp(self): diff --git a/nrrd/tests/test_parsing.py b/nrrd/tests/test_parsing.py index 9d5904f..bed73f3 100644 --- a/nrrd/tests/test_parsing.py +++ b/nrrd/tests/test_parsing.py @@ -6,8 +6,6 @@ import nrrd from nrrd.tests.util import * -sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(__file__)))) - class TestFieldParsing(unittest.TestCase): def setUp(self): diff --git a/nrrd/tests/test_reading.py b/nrrd/tests/test_reading.py index d3a39e5..d9579c7 100644 --- a/nrrd/tests/test_reading.py +++ b/nrrd/tests/test_reading.py @@ -6,8 +6,6 @@ import nrrd from nrrd.tests.util import * -sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(__file__)))) - class TestReadingFunctions: def setUp(self): From 55ca6b258b8f0d2e5febab5b17389b016a85ebe4 Mon Sep 17 00:00:00 2001 From: Addison Elliott Date: Sun, 3 Jul 2022 07:38:16 -0500 Subject: [PATCH 2/2] Remove unused imports --- nrrd/tests/test_formatting.py | 3 --- nrrd/tests/test_parsing.py | 3 --- nrrd/tests/test_reading.py | 3 --- 3 files changed, 9 deletions(-) diff --git a/nrrd/tests/test_formatting.py b/nrrd/tests/test_formatting.py index 9e3c3ea..74d8124 100644 --- a/nrrd/tests/test_formatting.py +++ b/nrrd/tests/test_formatting.py @@ -1,6 +1,3 @@ -import os -import sys - import numpy as np import nrrd diff --git a/nrrd/tests/test_parsing.py b/nrrd/tests/test_parsing.py index bed73f3..e6a7900 100644 --- a/nrrd/tests/test_parsing.py +++ b/nrrd/tests/test_parsing.py @@ -1,6 +1,3 @@ -import os -import sys - import numpy as np import nrrd diff --git a/nrrd/tests/test_reading.py b/nrrd/tests/test_reading.py index d9579c7..29efce0 100644 --- a/nrrd/tests/test_reading.py +++ b/nrrd/tests/test_reading.py @@ -1,6 +1,3 @@ -import os -import sys - import numpy as np import nrrd