Skip to content

Conversation

@guitargeek
Copy link
Contributor

If tests are actually passing, they should not be skipped. This is enforced by the strict=True keyword of the xfail marker, which makes the tests fail if it unexpectedly succeeded.

First step towards closing #20085.

@github-actions
Copy link

Test Results

    22 files      22 suites   3d 16h 2m 42s ⏱️
 3 813 tests  3 796 ✅  0 💤 17 ❌
76 715 runs  76 571 ✅ 99 💤 45 ❌

For more details on these failures, see this check.

Results for commit 5f370c9.

@guitargeek guitargeek force-pushed the issue-20085 branch 2 times, most recently from e36515c to 16ab12d Compare January 16, 2026 13:01
Comment on lines 1966 to 1968
else if (name == "basic_string<wchar_t,char_traits<wchar_t>,allocator<wchar_t> >"
|| name == "std::basic_string<wchar_t,char_traits<wchar_t>,allocator<wchar_t> >"
) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not exactly how it's done upstream

    else if (name == "std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >") {

So I don't understand the commit message

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, I got that wrong! I got confused when reading these long types. I'll fix this up.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated. I think I got it right now.

def has_cpp_20():
import cppyy

return cppyy.gbl.gInterpreter.ProcessLine("__cplusplus;") >= 202002
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this work? ProcessLine is returning an integer corresponding to the value of __cplusplus?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's correct. I got this pattern from the upstream cppyy test suite:
https://github.com/wlav/cppyy/blob/92967c195e47361dc04a6f1b0a77cfc745f4d914/test/test_stltypes.py#L1673

Follows up on 760b6cc, where not all possible type names were used
to match `std::wstring`. Somtimes, the initial `basic_string` part is
still prefixed with `std::`.

This enables the `test02_string_data_access` unit test in
`test_stltypes` from the cppyy test suite on all platforms.
This means the tests will fail if it unexpectedly passes.
@guitargeek guitargeek force-pushed the issue-20085 branch 2 times, most recently from 297fcf0 to f6691d8 Compare January 16, 2026 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants