Skip to content

Commit 98b28de

Browse files
rwestJacksonBurns
authored andcommitted
Fix to thermoTest TestCyclicThermo::test_remove_group
The test depends on the radical groups tree in the testing database being a certain way, which it no longer is. We used to test it on a different dummy database, which we have just removed to reduce redundancy, but rather than change the database to be that way (which messes up other tests) I am modifying the test to first put the database (in memory) the way it expects it to be. The function being tested here (remove_group) is never used in RMG. It was written in 89901fa by nyee who wrote, in 2016, "Currently, I am using this to remove CS groups as they are not detected properly". So we're fixing a broken test for a working function that is never used.
1 parent 14c6ab7 commit 98b28de

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

test/rmgpy/data/thermoTest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1644,6 +1644,9 @@ def test_remove_group(self):
16441644
group_to_remove = rad_group.entries["RJ"]
16451645
children = group_to_remove.children
16461646

1647+
# set up for testing below
1648+
rad_group.entries["OJ"].data = "RJ"
1649+
16471650
# remove the group
16481651
rad_group.remove_group(group_to_remove)
16491652

@@ -1663,6 +1666,7 @@ def test_remove_group(self):
16631666

16641667
# if group_to_remove is a pointer and another node pointed to it, we copy
16651668
# group_to_remove pointer
1669+
# OJ pointed to RJ and RJ pointed to CJ so if you remove RJ then OJ should point to CJ
16661670
assert rad_group.entries["OJ"].data is group_to_remove.data
16671671

16681672
# Remove an entry with a ThermoData object

0 commit comments

Comments
 (0)