Skip to content

Commit

Permalink
limit raises-tests to specific code (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxfischer2781 authored May 11, 2023
1 parent 9fe2e33 commit e2a11df
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cobald_tests/decorator/test_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,18 @@ def test_verification(self):
# no warnings by default
with pytest.warns(None) as recorded_warnings:
Logger(target=pool, name="test logger")
assert not recorded_warnings
assert not recorded_warnings

pool = FullMockPool()
with pytest.warns(FutureWarning):
pool = FullMockPool()
Logger(
target=pool,
name="test logger",
message="logging deprecated %(consumption)s",
)

pool = FullMockPool()
with pytest.raises(RuntimeError):
pool = FullMockPool()
Logger(
target=pool,
name="test logger",
Expand Down

0 comments on commit e2a11df

Please sign in to comment.