We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 61d204c commit 5998560Copy full SHA for 5998560
debug_unicode.py
@@ -3,6 +3,7 @@
3
4
import warnings
5
import sys
6
+import pytest
7
8
def test_unicode_warning():
9
"""Test that triggers Unicode in warnings system - matches actual test behavior"""
@@ -19,11 +20,12 @@ def test_unicode_warning():
19
20
decoded = result.decode('utf-8')
21
assert decoded == unicode_string
22
- # Trigger a warning with Unicode content (this is what causes the crash)
23
+ # Trigger a warning with Unicode content (this is what causes the crash in pytest)
24
warnings.warn(f"Test warning: {unicode_string}")
25
26
print("Test completed successfully")
27
28
if __name__ == "__main__":
- test_unicode_warning()
29
+ # Run through pytest to trigger the actual crash
30
+ pytest.main([__file__, "-v"])
31
0 commit comments