Skip to content

Commit

Permalink
remove unnecessary 'if __name__==__main__:unittest.main()' from test …
Browse files Browse the repository at this point in the history
…files (#130)
  • Loading branch information
sroet authored Feb 28, 2024
1 parent 0bd4763 commit 67516ca
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 28 deletions.
4 changes: 0 additions & 4 deletions tests/test00_parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,3 @@ def test_parallel_manager(self):
self.assertTrue(score.max() > 0.931, msg='lcc max value lower than expected')
self.assertEqual(ANGLE_ID, angle[ind])
self.assertSequenceEqual(LOCATION, ind)


if __name__ == '__main__':
unittest.main()
4 changes: 0 additions & 4 deletions tests/test_angles.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,3 @@ def test_load_list(self):
for sampling, (angle_file, n_rotations) in AVAILABLE_ROTATIONAL_SAMPLING.items():
angle_list = load_angle_list(angle_file)
self.assertEqual(len(angle_list), n_rotations, msg=f'Unexpected number of rotations for {angle_file}')


if __name__ == '__main__':
unittest.main()
4 changes: 0 additions & 4 deletions tests/test_extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,3 @@ def test_predict_tophat_mask(self):
tophat_mask = predict_tophat_mask(volume)
self.assertEqual(tophat_mask.shape, volume.shape, msg='tophat mask should have same size as input')
self.assertEqual(tophat_mask.dtype, bool, msg='predicted tophat mask should be boolean')


if __name__ == '__main__':
unittest.main()
4 changes: 0 additions & 4 deletions tests/test_mask.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,3 @@ def test_rotational_invariance_uneven(self):
self.assertAlmostEqual(sum(nxcc_centered), sum(nxcc_offcenter),
places=4, msg='Center of rotation for mask is incorrect.')
self.assertTrue(sum(nxcc_centered) > 99.09, msg='Precision of mask rotation is too low.')


if __name__ == '__main__':
unittest.main()
4 changes: 0 additions & 4 deletions tests/test_template_matching.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,3 @@ def test_search(self):
self.assertEqual(stats['search_space'], 256000000, msg='Search space should exactly equal this value')
self.assertAlmostEqual(stats['std'], 0.005175, places=5,
msg='Standard deviation of the search should be almost equal')


if __name__ == '__main__':
unittest.main()
4 changes: 0 additions & 4 deletions tests/test_tmjob.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,3 @@ def test_extraction(self):
create_plot=False)
self.assertNotEqual(len(scores), 0, msg='We expected a detected particle with a extraction mask that '
'covers the object.')


if __name__ == '__main__':
unittest.main()
4 changes: 0 additions & 4 deletions tests/test_weights.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,3 @@ def test_profile_to_weighting(self):
self.assertEqual(profile_to_weighting(profile, self.volume_shape_irregular[:2]).shape,
self.reduced_irregular_shape_2d,
msg='Profile to weighting should return 2D Fourier reduced array.')


if __name__ == '__main__':
unittest.main()

0 comments on commit 67516ca

Please sign in to comment.