Skip to content

Commit

Permalink
Merge pull request #1005 from OpenFreeEnergy/fix-1004
Browse files Browse the repository at this point in the history
Fix tests for issue 1004
  • Loading branch information
atravitz authored Nov 7, 2024
2 parents be2bb5e + c5adc20 commit ab9a78a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
9 changes: 8 additions & 1 deletion openfe/tests/protocols/test_rfe_tokenization.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def instance(self, protocol):

class TestRelativeHybridTopologyProtocolUnit(GufeTokenizableTestsMixin):
cls = openmm_rfe.RelativeHybridTopologyProtocolUnit
repr = "RelativeHybridTopologyProtocolUnit(benzene to toluene repeat 2 generation 0)"
repr = "RelativeHybridTopologyProtocolUnit(benzene to toluene repeat"
key = None

@pytest.fixture()
Expand All @@ -58,3 +58,10 @@ def instance(self, protocol_unit):

def test_key_stable(self):
pytest.skip()

def test_repr(self, instance):
"""
Overwrites the base `test_repr` call.
"""
assert isinstance(repr(instance), str)
assert self.repr in repr(instance)
20 changes: 14 additions & 6 deletions openfe/tests/protocols/test_solvation_afe_tokenization.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,28 +59,36 @@ def instance(self, protocol):

class TestAbsoluteSolvationSolventUnit(GufeTokenizableTestsMixin):
cls = openmm_afe.AbsoluteSolvationSolventUnit
repr = "AbsoluteSolvationSolventUnit(Absolute Solvation, benzene solvent leg: repeat 2 generation 0)"
repr = "AbsoluteSolvationSolventUnit(Absolute Solvation, benzene solvent leg"
key = None

@pytest.fixture()
def instance(self, solvent_protocol_unit):
return solvent_protocol_unit

def test_key_stable(self):
pytest.skip()
def test_repr(self, instance):
"""
Overwrites the base `test_repr` call.
"""
assert isinstance(repr(instance), str)
assert self.repr in repr(instance)


class TestAbsoluteSolvationVacuumUnit(GufeTokenizableTestsMixin):
cls = openmm_afe.AbsoluteSolvationVacuumUnit
repr = "AbsoluteSolvationVacuumUnit(Absolute Solvation, benzene vacuum leg: repeat 2 generation 0)"
repr = "AbsoluteSolvationVacuumUnit(Absolute Solvation, benzene vacuum leg"
key = None

@pytest.fixture()
def instance(self, vacuum_protocol_unit):
return vacuum_protocol_unit

def test_key_stable(self):
pytest.skip()
def test_repr(self, instance):
"""
Overwrites the base `test_repr` call.
"""
assert isinstance(repr(instance), str)
assert self.repr in repr(instance)


class TestAbsoluteSolvationProtocolResult(GufeTokenizableTestsMixin):
Expand Down

0 comments on commit ab9a78a

Please sign in to comment.