Skip to content

Commit f00644b

Browse files
committed
added test: parse_orca_runtime
1 parent 7f1f52d commit f00644b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

arc/parser/parser_test.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,6 +1000,15 @@ def test_parse_active_space(self):
10001000
xyz="""N 0.0 0.0 0.0"""))
10011001
self.assertEqual(active, {'e_o': (5, 4), 'occ': [3, 1, 1, 0, 1, 0, 0, 0], 'closed': [1, 0, 0, 0, 0, 0, 0, 0]})
10021002

1003+
def test_parse_orca_runtime(self):
1004+
"""Test the parse_orca_runtime function"""
1005+
import datetime
1006+
orca_path = os.path.join(ARC_TESTING_PATH, 'freq', 'orca_example_freq.log')
1007+
runtime = parser.parse_orca_runtime(log_file_path=orca_path)
1008+
self.assertIsInstance(runtime, datetime.timedelta)
1009+
# TOTAL RUN TIME: 0 days 0 hours 0 minutes 8 seconds 89 msec
1010+
self.assertEqual(runtime.total_seconds(), 8.089)
1011+
10031012

10041013
if __name__ == '__main__':
10051014
unittest.main(testRunner=unittest.TextTestRunner(verbosity=2))

0 commit comments

Comments
 (0)