Skip to content

Commit 2203e03

Browse files
bkjohpicnixz
andauthored
simplify non-ascii tests using ascii
Co-authored-by: Bénédikt Tran <[email protected]>
1 parent 07534ce commit 2203e03

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Lib/test/test_getpass.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,10 @@ def test_rejects_empty_string(self):
217217
def test_rejects_multi_character_strings(self, echo_char):
218218
self.assertRaises(ValueError, getpass.getpass, echo_char=echo_char)
219219

220-
@support.subTests('echo_char', ["Æ", "❤️", "🐍"])
220+
@support.subTests('echo_char', [
221+
'\N{LATIN CAPITAL LETTER AE}', # non-ASCII single character
222+
'\N{HEAVY BLACK HEART}', # non-ASCII multibyte character
223+
])
221224
def test_rejects_non_ascii(self, echo_char):
222225
self.assertRaises(ValueError, getpass.getpass, echo_char=echo_char)
223226

0 commit comments

Comments
 (0)