Skip to content

Commit

Permalink
some fixes from @braingram review
Browse files Browse the repository at this point in the history
  • Loading branch information
emolter committed Jan 27, 2025
1 parent 4def91b commit b5f985d
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions tests/test_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,8 @@ def save(self, path, dir_path=None, *args, **kwargs):
return None


def test_save(tmp_cwd):
def test_save_results(tmp_cwd):
"""Ensure model saved using custom save method override when save_results=True."""

model = SimpleDataModel()
model.saveid = "test"
Expand Down Expand Up @@ -525,16 +526,6 @@ def save(self, path, dir_path=None, *args, **kwargs):
model.save(path, dir_path, *args, **kwargs)


@pytest.mark.xfail(reason="Looping over models only works for list and tuple. This should be fixed.")
def test_save_container(tmp_cwd, model_list):
"""ensure list-like save still works for non-list sequence"""
container = SimpleContainer(model_list)
step = StepWithModel()
step.run(container)
for i in range(3):
assert (tmp_cwd / f"test{i}-saved.txt").exists()


def test_skip_container(tmp_cwd, model_list):
step = StepWithModel()
step.skip = True
Expand Down

0 comments on commit b5f985d

Please sign in to comment.