Skip to content

Commit

Permalink
Adapt test for additional log message
Browse files Browse the repository at this point in the history
  • Loading branch information
maxnoe committed Jul 16, 2024
1 parent 9e637a3 commit 6c249aa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ctapipe/core/tests/test_traits.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,11 +351,11 @@ class MyTool(Tool):
run_tool(tool, ["--MyTool.energy=5 m"], raises=True)

captured = capsys.readouterr()
assert (
captured.err.split(":")[-1]
== f" Given quantity is of physical type {u.get_physical_type(5 * u.m)}."
+ f" Expected {u.physical.energy}.\n"
expected = (
f" Given quantity is of physical type {u.get_physical_type(5 * u.m)}."
f" Expected {u.physical.energy}.\n"
)
assert expected in captured.err


def test_quantity_none():
Expand Down

0 comments on commit 6c249aa

Please sign in to comment.