diff --git a/testing/test_gateway.py b/testing/test_gateway.py index 634f237a..c571bbd2 100644 --- a/testing/test_gateway.py +++ b/testing/test_gateway.py @@ -130,6 +130,9 @@ def remote(): ) monkeypatch.syspath_prepend(tmp_path) + # The test is parametrized; drop the module cached by a previous run, + # whose source file has since been removed. + monkeypatch.delitem(sys.modules, "remote", raising=False) import remote # type: ignore[import-not-found] ch = gw.remote_exec(remote)