mirror of
https://github.com/python/cpython.git
synced 2025-08-15 14:20:55 +00:00
#7293: distutils.test_msvc9compiler now uses a key that exists on any fresh windows install
This commit is contained in:
parent
90ed611f6d
commit
acccafcf70
2 changed files with 8 additions and 5 deletions
|
@ -44,17 +44,17 @@ class msvc9compilerTestCase(unittest.TestCase):
|
|||
|
||||
# looking for values that should exist on all
|
||||
# windows registeries versions.
|
||||
path = r'Software\Microsoft\Notepad'
|
||||
v = Reg.get_value(path, u"lfitalic")
|
||||
self.assertTrue(v in (0, 1))
|
||||
path = r'Control Panel\Desktop'
|
||||
v = Reg.get_value(path, u'dragfullwindows')
|
||||
self.assertTrue(v in (u'0', u'1'))
|
||||
|
||||
import _winreg
|
||||
HKCU = _winreg.HKEY_CURRENT_USER
|
||||
keys = Reg.read_keys(HKCU, 'xxxx')
|
||||
self.assertEquals(keys, None)
|
||||
|
||||
keys = Reg.read_keys(HKCU, r'Software\Microsoft')
|
||||
self.assertTrue('Notepad' in keys)
|
||||
keys = Reg.read_keys(HKCU, r'Control Panel')
|
||||
self.assertTrue('Desktop' in keys)
|
||||
|
||||
def test_suite():
|
||||
return unittest.makeSuite(msvc9compilerTestCase)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue