mirror of
https://github.com/pybind/pybind11.git
synced 2025-01-19 09:25:51 +00:00
compiler_info MSVC fix. num_violations == 0 condition.
This commit is contained in:
parent
0d2bf264c8
commit
491c2c7983
@ -79,7 +79,7 @@ PYBIND11_MODULE(pybind11_tests, m) {
|
||||
m.doc() = "pybind11 test module";
|
||||
|
||||
#if defined(_MSC_FULL_VER)
|
||||
m.attr("compiler_info") = "MSVC " _MSC_FULL_VER;
|
||||
m.attr("compiler_info") = "MSVC " PYBIND11_TOSTRING(_MSC_FULL_VER);
|
||||
#elif defined(__VERSION__)
|
||||
m.attr("compiler_info") = __VERSION__;
|
||||
#else
|
||||
|
@ -36,7 +36,13 @@ def test_type_caster_odr_violation_detected_counter():
|
||||
num_violations = m.type_caster_odr_violation_detected_count()
|
||||
if num_violations is None:
|
||||
pytest.skip("type_caster_odr_violation_detected_count() is None")
|
||||
elif num_violations == 0:
|
||||
elif num_violations == 0 and (
|
||||
# 3.9-dbg (deadsnakes) Valgrind x64:
|
||||
# This failure is unexplained and the condition here is not completely specific,
|
||||
# but deemed a good-enough workaround.
|
||||
pybind11_tests.compiler_info == "9.4.0"
|
||||
and pybind11_tests.cpp_std == "C++17"
|
||||
):
|
||||
pytest.skip(
|
||||
"UNEXPECTED: type_caster_odr_violation_detected_count() == 0 (%s %s)"
|
||||
% (pybind11_tests.compiler_info, pybind11_tests.cpp_std)
|
||||
|
Loading…
Reference in New Issue
Block a user