Skip to content

Commit

Permalink
cov
Browse files Browse the repository at this point in the history
  • Loading branch information
ebonnal committed Oct 7, 2024
1 parent 5ec3a70 commit 54f7107
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/test_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -1044,9 +1044,18 @@ def test_throttle(self) -> None:
msg="`throttle` should raise error when called with `per_second` < 1.",
):
list(Stream([1]).throttle(per_second=0))
with self.assertRaises(
ValueError,
msg="`throttle` should raise error when called with `per_minute` < 1.",
):
list(Stream([1]).throttle(per_minute=0))
with self.assertRaises(
ValueError,
msg="`throttle` should raise error when called with `per_hour` < 1.",
):
list(Stream([1]).throttle(per_hour=0))

# test interval

interval_seconds = 0.3
super_slow_elem_pull_seconds = 1
N = 10
Expand Down

0 comments on commit 54f7107

Please sign in to comment.