diff --git a/tests/__init__.py b/tests/__init__.py deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/tests/test_basics.py b/tests/test_basics.py index 07df21c97fa1dbb09b458337cfe65446c7b1dea5..5175ce70492dffe24a245195abca5c7b80c64072 100644 --- a/tests/test_basics.py +++ b/tests/test_basics.py @@ -14,9 +14,7 @@ class TestBasicFunction(unittest.TestCase): sys.path.insert(0, modPath) def test_python_imports(self): - """ - Test imports - """ + """Test imports""" import numpy, scipy, matplotlib, vtk, AmpScan.core s = str(type(numpy)) self.assertEqual(s, "<class 'module'>") @@ -31,8 +29,6 @@ class TestBasicFunction(unittest.TestCase): @unittest.expectedFailure def test_failure(self): - """ - Test expected failure functionality of test suite - """ + """Test expected failure functionality of test suite""" s = str(type("string")) self.assertEqual(s, "<class 'module'>") diff --git a/tests/test_core.py b/tests/test_core.py index b1ebb53eec1e7038f46803c9285bb10ec0bf0ef1..e53afd22399f0a276d1549fbbc5527be9cc9a2e6 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -1,5 +1,5 @@ """ -Testing suite for the core functionality +Testing suite for the core module """ import unittest @@ -21,9 +21,7 @@ class TestCore(unittest.TestCase): self.amp = AmpObject(stl_path) def test_centre(self): - """ - Test the centre method of AmpObject - """ + """Test the centre method of AmpObject""" # Translate the mesh self.amp.translate([1, 0, 0]) @@ -35,9 +33,7 @@ class TestCore(unittest.TestCase): self.assertTrue(all(centre[i] < (10**-TestCore.ACCURACY) for i in range(3))) def test_rotate_ang(self): - """ - Tests the rotateAng method of AmpObject - """ + """Tests the rotateAng method of AmpObject""" # Test rotation on random node n = randrange(len(self.amp.vert)) @@ -59,9 +55,7 @@ class TestCore(unittest.TestCase): self.amp.rotateAng(dict()) def test_rotate(self): - """ - Tests the rotate method of AmpObject - """ + """Tests the rotate method of AmpObject""" # A test rotation and translation using list m = [[1, 0, 0], [0, np.sqrt(3)/2, 1/2], [0, -1/2, np.sqrt(3)/2]] self.amp.rotate(m) @@ -83,9 +77,7 @@ class TestCore(unittest.TestCase): self.amp.rotate([[], [], []]) def test_translate(self): - """ - Test translating method of AmpObject - """ + """Test translating method of AmpObject""" # Check that everything has been translated correctly to a certain accuracy start = self.amp.vert.mean(axis=0).copy() @@ -108,9 +100,7 @@ class TestCore(unittest.TestCase): self.amp.translate([0, 0, 0, 0]) def test_rigid_transform(self): - """ - Test the rigid transform method of AmpObject - """ + """Test the rigid transform method of AmpObject""" # Test if no transform is applied, vertices aren't affected before_vert = self.amp.vert.copy() diff --git a/tests/test_trim.py b/tests/test_trim.py index 77e2165f98d9101dda9dba60867b75254d3d92e8..abf9f4a5814014a9f22014cd262888dbe84f9e42 100644 --- a/tests/test_trim.py +++ b/tests/test_trim.py @@ -8,8 +8,7 @@ import os class TestTrim(unittest.TestCase): def setUp(self): - """ - Runs before each unit test + """Runs before each unit test Sets up the AmpObject object using "sample_stl_sphere_BIN.stl" """ from AmpScan.core import AmpObject @@ -17,16 +16,13 @@ class TestTrim(unittest.TestCase): self.amp = AmpObject(stl_path) def test_trim(self): - """ - a new test for the trim module - """ + """Tests the trim method of AmpObject""" with self.assertRaises(TypeError): self.amp.planarTrim([], plane=[]) @staticmethod def get_path(filename): - """ - Returns the absolute path to the testing files + """Returns the absolute path to the testing files :param filename: Name of the file in tests folder :return: The absolute path to the file