Skip to content

Commit

Permalink
Test turning smurf.stream off explicitly
Browse files Browse the repository at this point in the history
Previously relied on the finally block of seq.scan to cover these lines.
  • Loading branch information
BrianJKoopman committed Dec 11, 2023
1 parent 276d9db commit 5101362
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/test_smurf.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,11 @@ def test_take_noise(concurrent):
client.take_noise.start.assert_called_with(tag=None)


def test_stream():
smurf.stream(state='on')
@pytest.mark.parametrize("state", [("on"), ("off")])
def test_stream(state):
smurf.stream(state=state)
for client in smurf.run.CLIENTS['smurf']:
client.stream.start.assert_called_once()
if state == "on":
client.stream.start.assert_called_once()
else:
client.stream.stop.assert_called_once()

0 comments on commit 5101362

Please sign in to comment.