@@ -78,42 +78,3 @@ def testformat(formatstr, value, grouping = 0, output=None, func=locale.format):
7878
7979finally :
8080 locale .setlocale (locale .LC_NUMERIC , oldlocale )
81-
82-
83- # Test BSD Rune locale's bug for isctype functions.
84- def teststrop (s , method , output ):
85- s = str8 (s , 'latin1' ) # XXX
86- if verbose :
87- print ("%s.%s() =? %s ..." % (repr (s ), method , repr (output )), end = ' ' )
88- result = getattr (s , method )()
89- if result != output :
90- if verbose :
91- print ("no" )
92- print ("%s.%s() == %s != %s" % (repr (s ), method , repr (result ),
93- repr (output )))
94- elif verbose :
95- print ("yes" )
96-
97- try :
98- if sys .platform == 'sunos5' :
99- # On Solaris, in en_US.UTF-8, \xa0 is a space
100- raise locale .Error
101- oldlocale = locale .setlocale (locale .LC_CTYPE )
102- locale .setlocale (locale .LC_CTYPE , 'en_US.UTF-8' )
103- except locale .Error :
104- pass
105- else :
106- try :
107- teststrop ('\x20 ' , 'isspace' , True )
108- teststrop ('\xa0 ' , 'isspace' , False )
109- teststrop ('\xa1 ' , 'isspace' , False )
110- teststrop ('\xc0 ' , 'isalpha' , False )
111- teststrop ('\xc0 ' , 'isalnum' , False )
112- teststrop ('\xc0 ' , 'isupper' , False )
113- teststrop ('\xc0 ' , 'islower' , False )
114- teststrop ('\xec \xa0 \xbc ' , 'split' , ['\xec \xa0 \xbc ' ])
115- teststrop ('\xed \x95 \xa0 ' , 'strip' , '\xed \x95 \xa0 ' )
116- teststrop ('\xcc \x85 ' , 'lower' , '\xcc \x85 ' )
117- teststrop ('\xed \x95 \xa0 ' , 'upper' , '\xed \x95 \xa0 ' )
118- finally :
119- locale .setlocale (locale .LC_CTYPE , oldlocale )
0 commit comments