From afa8dc56063b739543c2a21c511bdec6adadaee3 Mon Sep 17 00:00:00 2001 From: Erik Bernhardsson Date: Fri, 10 Jan 2025 21:10:09 +0000 Subject: [PATCH] Fix tests --- test/container_test.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/container_test.py b/test/container_test.py index 7f5a543b4..8a9feb2cc 100644 --- a/test/container_test.py +++ b/test/container_test.py @@ -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 @@ -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