Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit52ddaef

Browse files
committed
Make test_locale pass by removing tests that were designed to handle
issues with <ctype.h> on various platforms. We no longer use <ctype.h>.
1 parent39013cd commit52ddaef

File tree

1 file changed

+0
-39
lines changed

1 file changed

+0
-39
lines changed

‎Lib/test/test_locale.py

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -78,42 +78,3 @@ def testformat(formatstr, value, grouping = 0, output=None, func=locale.format):
7878

7979
finally:
8080
locale.setlocale(locale.LC_NUMERIC,oldlocale)
81-
82-
83-
# Test BSD Rune locale's bug for isctype functions.
84-
defteststrop(s,method,output):
85-
s=str8(s,'latin1')# XXX
86-
ifverbose:
87-
print("%s.%s() =? %s ..."% (repr(s),method,repr(output)),end=' ')
88-
result=getattr(s,method)()
89-
ifresult!=output:
90-
ifverbose:
91-
print("no")
92-
print("%s.%s() == %s != %s"% (repr(s),method,repr(result),
93-
repr(output)))
94-
elifverbose:
95-
print("yes")
96-
97-
try:
98-
ifsys.platform=='sunos5':
99-
# On Solaris, in en_US.UTF-8, \xa0 is a space
100-
raiselocale.Error
101-
oldlocale=locale.setlocale(locale.LC_CTYPE)
102-
locale.setlocale(locale.LC_CTYPE,'en_US.UTF-8')
103-
exceptlocale.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

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp