Skip to content

Commit c30224a

Browse files
committed
Fix species tests for method_sources in TSGuess
cluster_tsgs() merges methods into method_sources list, not into the method string. Updated test_cluster_tsgs to expect the representative's original method and execution_time. Updated test_as_dict and test_from_dict to include method_sources in expected output.
1 parent a084cfe commit c30224a

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

arc/species/species_test.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2225,8 +2225,8 @@ def test_cluster_tsgs(self):
22252225
self.assertEqual(len(spc_1.ts_guesses), 4)
22262226
spc_1.cluster_tsgs()
22272227
self.assertEqual(len(spc_1.ts_guesses), 2)
2228-
self.assertEqual(spc_1.ts_guesses[0].method, 'user guess 0 + kinbot')
2229-
self.assertEqual(spc_1.ts_guesses[0].execution_time, '00:00:02 + 00:00:02')
2228+
self.assertEqual(spc_1.ts_guesses[0].method, 'user guess 0')
2229+
self.assertEqual(spc_1.ts_guesses[0].execution_time, '00:00:02')
22302230
self.assertEqual(spc_1.ts_guesses[0].index, 0)
22312231
self.assertEqual(spc_1.ts_guesses[1].method, 'gcn')
22322232
self.assertEqual(spc_1.ts_guesses[1].execution_time, '00:00:02')
@@ -2888,6 +2888,7 @@ def test_as_dict(self):
28882888
"""Test TSGuess.as_dict()"""
28892889
tsg_dict = self.tsg1.as_dict()
28902890
expected_dict = {'method': 'autotst',
2891+
'method_sources': ['autotst'],
28912892
'conformer_index': None,
28922893
'family': 'H_Abstraction',
28932894
'index': None,
@@ -2907,7 +2908,7 @@ def test_from_dict(self):
29072908
tsg = TSGuess(ts_dict=ts_dict)
29082909
self.assertEqual(tsg.method, 'autotst')
29092910
ts_dict_for_report = self.tsg1.as_dict(for_report=True)
2910-
self.assertEqual(list(ts_dict_for_report.keys()), ['method', 'method_index', 'success', 'index',
2911+
self.assertEqual(list(ts_dict_for_report.keys()), ['method', 'method_sources', 'method_index', 'success', 'index',
29112912
'conformer_index', 'initial_xyz', 'opt_xyz'])
29122913

29132914
def test_process_xyz(self):

0 commit comments

Comments
 (0)