summaryrefslogtreecommitdiff
path: root/Lib/distutils/tests/test_msvc9compiler.py
diff options
context:
space:
mode:
authorTarek Ziadé <ziade.tarek@gmail.com>2009-03-07 00:51:53 +0000
committerTarek Ziadé <ziade.tarek@gmail.com>2009-03-07 00:51:53 +0000
commit63b64c02115458476008c80285a5896d69012fdb (patch)
treeb1c5b3a0b84d4d03fe31899fd89a7e5c2ae9f6d6 /Lib/distutils/tests/test_msvc9compiler.py
parent113f60740e48a485c483c44db4cb3f9c67e1714d (diff)
downloadcpython-git-63b64c02115458476008c80285a5896d69012fdb.tar.gz
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 ........
Diffstat (limited to 'Lib/distutils/tests/test_msvc9compiler.py')
-rw-r--r--Lib/distutils/tests/test_msvc9compiler.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/Lib/distutils/tests/test_msvc9compiler.py b/Lib/distutils/tests/test_msvc9compiler.py
index 0c8bd6e042..e7d1620fdd 100644
--- a/Lib/distutils/tests/test_msvc9compiler.py
+++ b/Lib/distutils/tests/test_msvc9compiler.py
@@ -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)