Author: Matti Picus <matti.pi...@gmail.com> Branch: py3k Changeset: r84551:f80122a036dc Date: 2016-05-21 21:38 +0300 http://bitbucket.org/pypy/pypy/changeset/f80122a036dc/
Log: clean up _winreg, winreg problems to get tests running diff --git a/pypy/module/_codecs/test/test_codecs.py b/pypy/module/_codecs/test/test_codecs.py --- a/pypy/module/_codecs/test/test_codecs.py +++ b/pypy/module/_codecs/test/test_codecs.py @@ -141,8 +141,6 @@ class AppTestPartialEvaluation: spaceconfig = dict(usemodules=['array',]) - if sys.platform == 'win32': - spaceconfig['usemodules'].append('_winreg') def test_partial_utf8(self): import _codecs @@ -767,7 +765,7 @@ try: # test for non-latin1 codepage, more general test needed import winreg - key = winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, + key = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r'System\CurrentControlSet\Control\Nls\CodePage') if winreg.QueryValueEx(key, 'ACP')[0] == u'1255': # non-latin1 toencode = u'caf\xbf',b'caf\xbf' diff --git a/pypy/module/_winreg/test/test_winreg.py b/pypy/module/_winreg/test/test_winreg.py --- a/pypy/module/_winreg/test/test_winreg.py +++ b/pypy/module/_winreg/test/test_winreg.py @@ -19,7 +19,7 @@ canSaveKey = True class AppTestHKey: - spaceconfig = dict(usemodules=('_winreg',)) + #spaceconfig = dict(usemodules=('_winreg',)) def test_repr(self): import winreg @@ -27,7 +27,7 @@ assert str(k) == "<PyHKEY:0x123>" class AppTestFfi: - spaceconfig = dict(usemodules=('_winreg',)) + #spaceconfig = dict(usemodules=('_winreg',)) def setup_class(cls): import _winreg @@ -53,9 +53,9 @@ w_test_data.append(w_btest) def teardown_class(cls): - import _winreg + import winreg try: - _winreg.DeleteKey(cls.root_key, cls.test_key_name) + winreg.DeleteKey(cls.root_key, cls.test_key_name) except WindowsError: pass _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit