test_occt_bugs.py -> attempt to bypass pytest stdout capture

This commit is contained in:
jdegenstein 2025-10-17 12:57:18 -05:00 committed by GitHub
parent 45976ff2b0
commit 69e7029285
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -33,7 +33,7 @@ def expected_to_fail(test_func):
warning_message = (
f"::warning file={filename},line={lineno},title=Unexpected Pass::{test_name} passed but was expected to fail"
)
print(warning_message, file=sys.stdout)
print(warning_message, file=sys.__stdout__) # bypass pytest sys.stdout capture
# Use pytest.skip to ensure the test is NOT reported as a "pass".
pytest.skip("This test passed but was expected to fail.")