Skip to content

Commit

Permalink
(RSS) adding tests for calculate_KS2022_randomSolutions with matrix…
Browse files Browse the repository at this point in the history
… of input types: parallel pair
  • Loading branch information
amkrajewski committed Feb 12, 2024
1 parent 3f14836 commit 9f157d2
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pysipfenn/tests/test_pysipfenn.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,19 @@ def test_descriptorCalculate_KS2022_randomSolution_serial_multiple(self):
, places=6, msg="mean_NeighDiff_shell1_Number (KS2022[13]) should be different (1.0vs2.0)."
)

def test_descriptorCalculate_KS2022_randomSolution_parallel_pair(self):
"""Test successful execution of a composition-structure pair in parallel mode. Just for the input passing
validation."""

with self.subTest(msg="Running single composition-structure pair"):
d1 = self.c.calculate_KS2022_randomSolutions(
'BCC',
'FeNi',
mode='parallel',
max_workers=1)
self.assertEqual(len(d1), 1, "Only one composition-structure pair should be processed.")
self.assertEqual(len(d1[0]), 256, "All 256 KS2022 features should be obtained.")


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

0 comments on commit 9f157d2

Please sign in to comment.