From e563985c2524f3be5fd5c3994f4bbba520611b8f Mon Sep 17 00:00:00 2001 From: Richard West Date: Sat, 30 Mar 2024 11:58:56 -0400 Subject: [PATCH] Fix test_remove_group for new radical tree structure. The specific groups used in the example have changed. I came up with new example, that I think tests the same thing. --- test/rmgpy/data/thermoTest.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/rmgpy/data/thermoTest.py b/test/rmgpy/data/thermoTest.py index 881f3fcbb0..2ebf39876c 100644 --- a/test/rmgpy/data/thermoTest.py +++ b/test/rmgpy/data/thermoTest.py @@ -1670,15 +1670,15 @@ def test_remove_group(self): assert rad_group.entries["OJ"].data is group_to_remove.data # Remove an entry with a ThermoData object - group_to_remove2 = rad_group.entries["CsJ"] + group_to_remove2 = rad_group.entries["Cs_P"] rad_group.remove_group(group_to_remove2) # If group_to_remove was a data object, we point toward parent instead - # RJ2_triplet pointed to CsJ, which had data - # After we remove CsJ, RJ2_triplet points to the parent, which was RJ - assert rad_group.entries["RJ2_triplet"].data == group_to_remove2.parent.label + # CsCsJ pointed to Cs_P, which had data. + # After we remove Cs_P, CsCsJ points to the parent, which was CsJ + assert rad_group.entries["CsCsJ"].data == group_to_remove2.parent.label # If the parent pointed toward group_to_remove, we need should have copied data object - # RJ used to just point at CJ, which pointed at CsJ. After we remove CsJ, - # RJ should contain the data copied from CsJ + # CsJ (the parent) used to just point at Cs_P. + # After we remove Cs_P, CsJ should contain the data copied from Cs_P Tlist = [300, 400, 500, 600, 800, 1000, 1500] assert not isinstance(group_to_remove2.parent.data, str) assert group_to_remove2.parent.data.get_enthalpy(298) == group_to_remove2.data.get_enthalpy(298)