15 #define CATCH_CONFIG_RUNNER
20 int main(
int argc,
char *argv[]) {
22 std::string updated_pythonpath(
"pybind11_test_embed_PYTHONPATH_2099743835476552");
23 const char *preexisting_pythonpath = getenv(
"PYTHONPATH");
24 if (preexisting_pythonpath !=
nullptr) {
26 updated_pythonpath +=
';';
28 updated_pythonpath +=
':';
30 updated_pythonpath += preexisting_pythonpath;
33 _putenv_s(
"PYTHONPATH", updated_pythonpath.c_str());
35 setenv(
"PYTHONPATH", updated_pythonpath.c_str(), 1);
38 py::scoped_interpreter guard{};
40 auto result = Catch::Session().run(argc, argv);