Skip to content

Commit

Permalink
Add clear status test for file backend #38
Browse files Browse the repository at this point in the history
  • Loading branch information
donaldcampbelljr committed Aug 4, 2023
1 parent ca1e18d commit ef2481a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_pipestat.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,15 @@ def test_basics(
psm = PipestatManager(**args)
psm.report(sample_name=rec_id, values=val, force_overwrite=True)
val_name = list(val.keys())[0]
psm.set_status(status_identifier="running", sample_name=rec_id)
status = psm.get_status(sample_name=rec_id)
assert status == "running"
assert val_name in psm.retrieve(sample_name=rec_id)
psm.remove(sample_name=rec_id, result_identifier=val_name)
if backend == "file":
psm.clear_status(sample_name=rec_id)
status = psm.get_status(sample_name=rec_id)
assert status is None
with pytest.raises(PipestatDataError):
psm.retrieve(sample_name=rec_id)
if backend == "db":
Expand Down

0 comments on commit ef2481a

Please sign in to comment.