mirror of
https://github.com/pybind/pybind11.git
synced 2025-01-19 17:32:37 +00:00
Report PYBIND11_INTERNALS_ID & C++ Version from pytest_configure()
This commit is contained in:
parent
cfd98a7de2
commit
502f3cb969
@ -13,7 +13,7 @@ import textwrap
|
|||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
# Early diagnostic for failed imports
|
# Early diagnostic for failed imports
|
||||||
import pybind11_tests # noqa: F401
|
import pybind11_tests
|
||||||
|
|
||||||
_long_marker = re.compile(r"([0-9])L")
|
_long_marker = re.compile(r"([0-9])L")
|
||||||
_hexadecimal = re.compile(r"0x[0-9a-fA-F]+")
|
_hexadecimal = re.compile(r"0x[0-9a-fA-F]+")
|
||||||
@ -196,5 +196,11 @@ def gc_collect():
|
|||||||
|
|
||||||
|
|
||||||
def pytest_configure():
|
def pytest_configure():
|
||||||
|
print(
|
||||||
|
"PYBIND11_INTERNALS_ID & C++ Version:",
|
||||||
|
pybind11_tests.PYBIND11_INTERNALS_ID,
|
||||||
|
pybind11_tests.cpp_version_in_use,
|
||||||
|
flush=True,
|
||||||
|
)
|
||||||
pytest.suppress = suppress
|
pytest.suppress = suppress
|
||||||
pytest.gc_collect = gc_collect
|
pytest.gc_collect = gc_collect
|
||||||
|
@ -65,6 +65,9 @@ void bind_ConstructorStats(py::module_ &m) {
|
|||||||
PYBIND11_MODULE(pybind11_tests, m) {
|
PYBIND11_MODULE(pybind11_tests, m) {
|
||||||
m.doc() = "pybind11 test module";
|
m.doc() = "pybind11 test module";
|
||||||
|
|
||||||
|
m.attr("cpp_version_in_use") = py::detail::cpp_version_in_use();
|
||||||
|
m.attr("PYBIND11_INTERNALS_ID") = PYBIND11_INTERNALS_ID;
|
||||||
|
|
||||||
bind_ConstructorStats(m);
|
bind_ConstructorStats(m);
|
||||||
|
|
||||||
#if defined(PYBIND11_DETAILED_ERROR_MESSAGES)
|
#if defined(PYBIND11_DETAILED_ERROR_MESSAGES)
|
||||||
|
Loading…
Reference in New Issue
Block a user