File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 1717
1818STATUS = 0
1919
20-
2120def error_unless_permitted (env_var , message ):
2221 global STATUS
2322 if not os .getenv (env_var ):
2423 sys .stderr .write (message )
2524 STATUS = 1
2625
27-
2826def only_on (platforms ):
2927 def decorator (func ):
3028 @functools .wraps (func )
@@ -34,8 +32,7 @@ def inner():
3432 return inner
3533 return decorator
3634
37-
38- @only_on (('linux' , 'darwin' , 'freebsd' , 'openbsd' ))
35+ @only_on (['linux' , 'darwin' , 'freebsd' , 'openbsd' ])
3936def check_rlimit_core ():
4037 import resource
4138 soft , hard = resource .getrlimit (resource .RLIMIT_CORE )
@@ -46,9 +43,9 @@ def check_rlimit_core():
4643set ALLOW_NONZERO_RLIMIT_CORE to ignore this warning
4744""" % (soft ))
4845
49- @only_on (( 'windows' ) )
46+ @only_on ([ 'win32' ] )
5047def check_console_code_page ():
51- if " 65001" not in subprocess .check_output (['cmd' , '/c' , 'chcp' ]):
48+ if ' 65001' not in subprocess .check_output (['cmd' , '/c' , 'chcp' ]):
5249 sys .stderr .write ('Warning: the console output code page is not UTF-8, \
5350 some tests may fail. Use `cmd /c "chcp 65001"` to setup UTF-8 code page.\n ' )
5451
You can’t perform that action at this time.
0 commit comments