Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
erikbern committed Jan 10, 2025
1 parent ccf56ec commit afa8dc5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/container_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,9 @@ def test_failure(servicer, capsys):
@skip_github_non_linux
def test_raises_base_exception(servicer, capsys):
ret = _run_container(servicer, "test.supports.functions", "raises_sysexit")
assert _unwrap_exception(ret) == SystemExit(1)
exc = _unwrap_exception(ret)
assert isinstance(exc, SystemExit)
assert repr(exc) == "SystemExit(1)"
assert "raise SystemExit(1)" in capsys.readouterr().err # traceback


Expand Down Expand Up @@ -2464,7 +2466,9 @@ def test_container_app_one_matching(servicer, event_loop):
@skip_github_non_linux
def test_no_event_loop(servicer, event_loop):
ret = _run_container(servicer, "test.supports.functions", "get_running_loop")
assert _unwrap_exception(ret) == RuntimeError("no running event loop")
exc = _unwrap_exception(ret)
assert isinstance(exc, RuntimeError)
assert repr(exc) == "RuntimeError('no running event loop')"


@skip_github_non_linux
Expand Down

0 comments on commit afa8dc5

Please sign in to comment.