Skip to content

Commit 27c59d7

Browse files
authored
(tests) small cleanup in all files
1 parent 8c863bf commit 27c59d7

9 files changed

Lines changed: 2 additions & 34 deletions

pysipfenn/tests/test_AllCompatibleONNX_Ward2017.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,4 @@ def test_runtime(self):
1919
c.runFromDirectory(directory=exampleInputsDir, descriptor='Ward2017')
2020
print(c.get_resultDicts())
2121
c.writeResultsToCSV('Ward2017-ONNX_testResults.csv')
22-
23-
if __name__ == '__main__':
24-
unittest.main()
22+

pysipfenn/tests/test_Core_prototypeLibrary.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,3 @@ def test_customPrototypeLoad(self):
9191

9292
with self.subTest(msg="Restore the original prototype library"):
9393
pysipfenn.overwritePrototypeLibrary(backup)
94-
95-
96-
97-
98-

pysipfenn/tests/test_KS2022.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,3 @@ def test_parallel(self):
8484
'''
8585
KS2022.profileParallel(test='JVASP-10001', nRuns=24)
8686
KS2022.profileParallel(test='diluteNiAlloy', nRuns=24)
87-
88-
89-
if __name__ == '__main__':
90-
unittest.main()

pysipfenn/tests/test_KS2022_dilute.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,3 @@ def test_parallel(self):
9999
workers to speed up the execution.
100100
'''
101101
KS2022_dilute.profileParallel(test='diluteNiAlloy', nRuns=64)
102-
103-
104-
if __name__ == '__main__':
105-
unittest.main()

pysipfenn/tests/test_KS2022_randomSolutions.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,3 @@ def test_serialInParallel(self):
7676
def test_singleInParallel(self):
7777
'''Tests parallel execution profiling works.'''
7878
KS2022_randomSolutions.profile(test='BCC', nIterations=2)
79-
80-
if __name__ == '__main__':
81-
unittest.main()

pysipfenn/tests/test_Krajewski2020_NN9NN20NN24_ONNX.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,4 @@ def test_resutls(self):
3535
for p, name, ref_mxnet in zip(c.predictions[0], toTest, referenceEnergies_MxNet):
3636
with self.subTest(msg=f'Predicting vs MxNet with {name:<16}'):
3737
self.assertAlmostEqual(p, ref_mxnet, places=6)
38-
39-
if __name__ == '__main__':
40-
unittest.main()
38+

pysipfenn/tests/test_Ward2017.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,3 @@ def test_parallel(self):
6969
'''
7070
Ward2017.profileParallel(test='JVASP-10001', nRuns=24)
7171
Ward2017.profileParallel(test='diluteNiAlloy', nRuns=24)
72-
73-
74-
if __name__ == '__main__':
75-
unittest.main()

pysipfenn/tests/test_customModel.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,3 @@ def tearDown(self) -> None:
5252
print('\nTearing down')
5353
os.remove('MyFunNet.onnx')
5454
print('Removed MyFunNet')
55-
56-
57-
if __name__ == '__main__':
58-
unittest.main()

pysipfenn/tests/test_pysipfenn.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,3 @@ def test_descriptorCalculate_KS2022_randomSolution_parallel_multiple(self):
432432
self.assertIn('finalAtomsN', meta)
433433
self.assertIn('finalCompositionDistance', meta)
434434
self.assertIn('finalComposition', meta)
435-
436-
437-
if __name__ == '__main__':
438-
unittest.main()

0 commit comments

Comments
 (0)