Skip to content

Commit

Permalink
Test: __str__ function in arc/statmech/arkane (#658)
Browse files Browse the repository at this point in the history
As a mission to increase our coverage, testing for an untested function
are added here.
  • Loading branch information
alongd committed May 21, 2023
2 parents b5a305a + 5d1b9df commit e964a58
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions arc/statmech/arkane_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,22 @@ def setUpClass(cls):
sp_level=Level('gfn2'),
)

def test__str__(self):
"""Test the __str__ function"""
for arkane in [self.arkane_1, self.arkane_2, self.arkane_3]:
repr = arkane.__str__()
self.assertIn('ArkaneAdapter(', repr)
self.assertIn(f'output_directory={arkane.output_directory}, ', repr)
self.assertIn(f'bac_type={arkane.bac_type}, ', repr)
self.assertIn(f'freq_scale_factor={arkane.freq_scale_factor}, ', repr)
self.assertIn(f'species={arkane.species}, ', repr)
self.assertIn(f'reaction={arkane.reaction}, ', repr)
self.assertIn(f'T_min={arkane.T_min}, ', repr)
self.assertIn(f'T_max={arkane.T_max}, ', repr)
self.assertIn(f'T_count={arkane.T_count})', repr)
if arkane.sp_level is not None:
self.assertIn(f'sp_level={arkane.sp_level.simple()}', repr)

def test_arkane_has_en_corr(self):
"""Test the arkane_has_en_corr() function"""
self.arkane_1.sp_level = Level('CBS-QB3')
Expand Down

0 comments on commit e964a58

Please sign in to comment.