File tree Expand file tree Collapse file tree 1 file changed +16
-11
lines changed
Expand file tree Collapse file tree 1 file changed +16
-11
lines changed Original file line number Diff line number Diff line change 1313
1414import threading
1515from platform import machine
16- # pylint: disable=unused-import
17- from platform import platform as pplatform
16+ from platform import python_implementation
1817
1918# pylint: disable=redefined-builtin
2019# pylint: disable=wildcard-import
2524# pylint: disable=invalid-name
2625# pylint: disable=consider-using-f-string
2726
27+ USING_PYPY = python_implementation ().lower () == "pypy"
28+
2829try :
2930 from platform import win32_edition
3031except ImportError :
@@ -267,22 +268,26 @@ def test_registry_works(self):
267268 """
268269 Try unicode
269270 """
270- self ._test_all (HKEY_CURRENT_USER )
271- self ._test_all (HKEY_CURRENT_USER , "日本-subkey" )
271+ if not USING_PYPY :
272+ self ._test_all (HKEY_CURRENT_USER )
273+ self ._test_all (HKEY_CURRENT_USER , "日本-subkey" )
272274
273275 def test_registry_works_extended_functions (self ):
274276 """
275277 Substitute the regular CreateKey and OpenKey calls with their
276278 extended counterparts.
277279 Note: DeleteKeyEx is not used here because it is platform dependent
278280 """
279- def cke (
280- key ,
281- sub_key ): return CreateKeyEx (
282- key ,
283- sub_key ,
284- 0 ,
285- KEY_ALL_ACCESS )
281+
282+ if USING_PYPY :
283+ return
284+
285+ def cke (key , sub_key ):
286+ return CreateKeyEx (
287+ key ,
288+ sub_key ,
289+ 0 ,
290+ KEY_ALL_ACCESS )
286291 self ._write_test_data (HKEY_CURRENT_USER , CreateKey = cke )
287292
288293 def oke (key , sub_key ):
You can’t perform that action at this time.
0 commit comments