4#include <pybind11/embed.h>
15#define CATCH_CONFIG_RUNNER
20int 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);
42 return result < 0xff ? result : 0xff;
int main(int argc, char *argv[])
#define PYBIND11_WARNING_DISABLE_MSVC(name)