pybind11/tests/test_embed
Ralf W. Grosse-Kunstleve 68e6fdaa90
embed.h Python 3.11 config.use_environment=1 + PYTHONPATH test (#4119)
* Add debug fprintf to test_interpreter.cpp

* Update `sys.path` from `PYTHONPATH` in Python >= 3.11 branch of `initialize_interpreter()`

* Use `config.isolated = 0; config.use_environment = 1;`

As suggsted by @vstinner here: https://github.com/pybind/pybind11/pull/4119#issuecomment-1219442853

* Add `TEST_CASE("PYTHONPATH is used to update sys.path")`

* Fix clang-tidy error.

* Use `_putenv_s()` under Windows.

* Fix clang-tidy error: argument name ... in comment does not match parameter name

* Remove slash from PYTHONPATH addition, to work around Windows slash-vs-backslash issue.

* Use `py::str(...)` instead of `.attr("__str__")` as suggested by @skylion007

Co-authored-by: Aaron Gokaslan <skylion.aaron@gmail.com>

Co-authored-by: Aaron Gokaslan <skylion.aaron@gmail.com>
2022-08-21 09:44:01 -07:00
..
catch.cpp embed.h Python 3.11 config.use_environment=1 + PYTHONPATH test (#4119) 2022-08-21 09:44:01 -07:00
CMakeLists.txt chore: bump clang-tidy to 13 (#3997) 2022-07-13 09:06:32 -05:00
external_module.cpp Fully-automatic clang-format with include reordering (#3713) 2022-02-10 12:17:07 -08:00
test_interpreter.cpp embed.h Python 3.11 config.use_environment=1 + PYTHONPATH test (#4119) 2022-08-21 09:44:01 -07:00
test_interpreter.py Python 2 removal part 1: tests (C++ code is intentionally ~untouched) (#3688) 2022-02-10 18:28:08 -08:00
test_trampoline.py Python 2 removal part 1: tests (C++ code is intentionally ~untouched) (#3688) 2022-02-10 18:28:08 -08:00