diff --git a/test/mitmproxy/addons/test_script.py b/test/mitmproxy/addons/test_script.py index c36279cb4..e2dfc0b2b 100644 --- a/test/mitmproxy/addons/test_script.py +++ b/test/mitmproxy/addons/test_script.py @@ -25,7 +25,7 @@ def test_load_script(tmp_path, tdata, caplog): assert ns.addons script.load_script("nonexistent") - assert "No such file or directory" in caplog.text + assert "FileNotFoundError" in caplog.text (tmp_path / "error.py").write_text("this is invalid syntax") script.load_script(str(tmp_path / "error.py"))