Skip to content

Commit

Permalink
Work around wrong model group IDs in python-ihm 1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
benmwebb committed Oct 31, 2024
1 parent d5bf704 commit 3455d08
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/test_mmcif.py
Original file line number Diff line number Diff line change
Expand Up @@ -1049,6 +1049,8 @@ def test_ensemble_dumper(self):
"""Test dumping of simple ensembles"""
class DummyPostProcess(object):
pass
class DummyModel:
pass
m = IMP.Model()
simo = IMP.pmi1.representation.Representation(m)
po = DummyPO(None)
Expand All @@ -1058,8 +1060,12 @@ class DummyPostProcess(object):
pp._id = 99
e1 = po._add_simple_ensemble(pp, 'Ensemble 1', 5, 0.1, 1,
{}, None)
# Work around python-ihm 1.7 not handling IDs of empty model
# groups properly
e1.model_group.append(DummyModel())
e2 = po._add_simple_ensemble(pp, 'Ensemble 2', 5, 0.1, 1,
{}, None)
e2.model_group.append(DummyModel())
loc = ihm.location.InputFileLocation(repo='foo', path='bar')
po.set_ensemble_file(1, loc)
loc._id = 42
Expand Down

0 comments on commit 3455d08

Please sign in to comment.