File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import unittest
2+ import sys
23from test import support
34
45class PEP3131Test (unittest .TestCase ):
@@ -8,12 +9,20 @@ class T:
89 ä = 1
910 µ = 2 # this is a compatibility character
1011 蟒 = 3
11- 𝔘𝔫𝔦𝔠𝔬𝔡𝔢 = 4
12+ x󠄀 = 4
1213 self .assertEqual (getattr (T , "\xe4 " ), 1 )
1314 self .assertEqual (getattr (T , "\u03bc " ), 2 )
1415 self .assertEqual (getattr (T , '\u87d2 ' ), 3 )
15- v = getattr (T , "\U0001d518 \U0001d52b \U0001d526 \U0001d520 \U0001d52c \U0001d521 \U0001d522 " )
16- self .assertEqual (v , 4 )
16+ self .assertEqual (getattr (T , 'x\U000E0100 ' ), 4 )
17+
18+ def test_non_bmp_normalized (self ):
19+ 𝔘𝔫𝔦𝔠𝔬𝔡𝔢 = 1
20+ # On wide builds, this is normalized, but on narrow ones it is not. See
21+ # #12746.
22+ try :
23+ self .assertIn ("𝔘𝔫𝔦𝔠𝔬𝔡𝔢" , dir ())
24+ except AssertionError :
25+ raise unittest .case ._ExpectedFailure (sys .exc_info ())
1726
1827 def test_invalid (self ):
1928 try :
You can’t perform that action at this time.
0 commit comments