mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
Merged revisions 70212 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r70212 | tarek.ziade | 2009-03-07 01:32:45 +0100 (Sat, 07 Mar 2009) | 1 line Issue #5394: removed > 2.3 syntax from distutils.msvc9compiler ........
This commit is contained in:
parent
113f60740e
commit
63b64c0211
3 changed files with 45 additions and 16 deletions
|
@ -30,6 +30,28 @@ class msvc9compilerTestCase(unittest.TestCase):
|
|||
finally:
|
||||
msvc9compiler.find_vcvarsall = old_find_vcvarsall
|
||||
|
||||
def test_reg_class(self):
|
||||
if sys.platform != 'win32':
|
||||
# this test is only for win32
|
||||
return
|
||||
|
||||
from distutils.msvc9compiler import Reg
|
||||
self.assertRaises(KeyError, Reg.get_value, 'xxx', 'xxx')
|
||||
|
||||
# looking for values that should exist on all
|
||||
# windows registeries versions.
|
||||
path = r'Software\Microsoft\Notepad'
|
||||
v = Reg.get_value(path, "lfitalic")
|
||||
self.assert_(v in (0, 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.assert_('Notepad' in keys)
|
||||
|
||||
def test_suite():
|
||||
return unittest.makeSuite(msvc9compilerTestCase)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue