diff --git a/tests/test_embed/catch.cpp b/tests/test_embed/catch.cpp index 558a7a35e5..96d3dca6b9 100644 --- a/tests/test_embed/catch.cpp +++ b/tests/test_embed/catch.cpp @@ -35,6 +35,7 @@ int main(int argc, char *argv[]) { setenv("PYTHONPATH", updated_pythonpath.c_str(), /*replace=*/1); #endif + { py::scoped_interpreter guard; } py::scoped_interpreter guard{}; auto result = Catch::Session().run(argc, argv);