summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorZackery Spytz <zspytz@gmail.com>2019-06-01 00:16:20 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2019-06-01 00:16:20 (GMT)
commit549e55a3086d04c13da9b6f33214f6399681292a (patch)
treed3c4a93edc5b6226e0662fde023c861d7352e4fb /Lib
parented9f3562b637a59b9000abbceee5ae369d35444d (diff)
downloadcpython-549e55a3086d04c13da9b6f33214f6399681292a.zip
cpython-549e55a3086d04c13da9b6f33214f6399681292a.tar.gz
cpython-549e55a3086d04c13da9b6f33214f6399681292a.tar.bz2
bpo-12202: Properly check MsiSummaryInfoGetProperty() calls in msilib (GH-13711)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_msilib.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_msilib.py b/Lib/test/test_msilib.py
index 265eaea..fa0be58 100644
--- a/Lib/test/test_msilib.py
+++ b/Lib/test/test_msilib.py
@@ -85,6 +85,7 @@ class MsiDatabaseTestCase(unittest.TestCase):
def test_directory_start_component_keyfile(self):
db, db_path = init_database()
+ self.addCleanup(unlink, db_path)
self.addCleanup(db.Close)
feature = msilib.Feature(db, 0, 'Feature', 'A feature', 'Python')
cab = msilib.CAB('CAB')
@@ -92,6 +93,14 @@ class MsiDatabaseTestCase(unittest.TestCase):
'SourceDir', 0)
dir.start_component(None, feature, None, 'keyfile')
+ def test_getproperty_uninitialized_var(self):
+ db, db_path = init_database()
+ self.addCleanup(unlink, db_path)
+ self.addCleanup(db.Close)
+ si = db.GetSummaryInformation(0)
+ with self.assertRaises(msilib.MSIError):
+ si.GetProperty(-1)
+
class Test_make_id(unittest.TestCase):
#http://msdn.microsoft.com/en-us/library/aa369212(v=vs.85).aspx