Skip to content

Commit 1e262d1

Browse files
committed
Test on windows
1 parent 59816e1 commit 1e262d1

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

test/test_windows_encoding.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,16 @@ def test_cli_stdout_with_unicode():
193193
# Decode stdout and verify Unicode characters are present
194194
stdout_text = safe_decode(result.stdout)
195195

196-
if sys.version_info[0] >= 3:
197-
# Python 3: Unicode characters should appear literally
196+
if hasattr(sys, 'pypy_version_info') and sys.version_info[0] >= 3:
197+
# PyPy3: Unicode characters are escaped as \\u escapes
198+
assert "\\u274c" in stdout_text # ❌
199+
assert "✓" in stdout_text # ✓
200+
assert "\\U0001f40d" in stdout_text # 🐍
201+
assert "Привет" in stdout_text # Привет
202+
assert "©" in stdout_text # ©
203+
assert "∀" in stdout_text # ∀
204+
elif sys.version_info[0] >= 3:
205+
# CPython 3: Unicode characters should appear literally
198206
assert "❌" in stdout_text
199207
assert "✓" in stdout_text
200208
assert "🐍" in stdout_text

0 commit comments

Comments
 (0)