Author: Armin Rigo <[email protected]> Branch: Changeset: r57105:5b12e8df1272 Date: 2012-09-03 19:44 +0200 http://bitbucket.org/pypy/pypy/changeset/5b12e8df1272/
Log: Windows test fix: port http://bugs.python.org/issue15334 . diff --git a/lib-python/2.7/test/test_winreg.py b/lib-python/2.7/test/test_winreg.py --- a/lib-python/2.7/test/test_winreg.py +++ b/lib-python/2.7/test/test_winreg.py @@ -1,7 +1,7 @@ # Test the windows specific win32reg module. # Only win32reg functions not hit here: FlushKey, LoadKey and SaveKey -import os, sys +import os, sys, errno import unittest from test import test_support threading = test_support.import_module("threading") @@ -283,7 +283,13 @@ def test_dynamic_key(self): # Issue2810, when the value is dynamically generated, these # throw "WindowsError: More data is available" in 2.6 and 3.1 - EnumValue(HKEY_PERFORMANCE_DATA, 0) + try: + EnumValue(HKEY_PERFORMANCE_DATA, 0) + except OSError as e: + if e.errno in (errno.EPERM, errno.EACCES): + self.skipTest("access denied to registry key " + "(are you running in a non-interactive session?)") + raise QueryValueEx(HKEY_PERFORMANCE_DATA, None) # Reflection requires XP x64/Vista at a minimum. XP doesn't have this stuff _______________________________________________ pypy-commit mailing list [email protected] http://mail.python.org/mailman/listinfo/pypy-commit
