summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_msilib.py
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2017-11-24 16:04:40 (GMT)
committerGitHub <noreply@github.com>2017-11-24 16:04:40 (GMT)
commit412f00b839eae2bc07ca08a8e615c3d7dc870646 (patch)
tree126196c0b0e68358561f2f3687ab90a144281491 /Lib/test/test_msilib.py
parentbfa89b21e119bac7fed4a5decc26f1fff8ec359e (diff)
downloadcpython-412f00b839eae2bc07ca08a8e615c3d7dc870646.zip
cpython-412f00b839eae2bc07ca08a8e615c3d7dc870646.tar.gz
cpython-412f00b839eae2bc07ca08a8e615c3d7dc870646.tar.bz2
[3.6] bpo-12239: Make GetProperty() return None for VT_EMPTY (GH-4539)
The previous behavior was to raise an exception NotImplementedError: result of type 0 when the value of the property is VT_EMPTY. (cherry picked from commit 19fb134185ce155bc53f517116fca73093ba55e9)
Diffstat (limited to 'Lib/test/test_msilib.py')
-rw-r--r--Lib/test/test_msilib.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_msilib.py b/Lib/test/test_msilib.py
index eb2c76e..fec435e 100644
--- a/Lib/test/test_msilib.py
+++ b/Lib/test/test_msilib.py
@@ -52,6 +52,13 @@ class MsiDatabaseTestCase(unittest.TestCase):
msilib.OpenDatabase(db_path, msilib.MSIDBOPEN_CREATE)
self.assertEqual(str(cm.exception), 'create failed')
+ def test_get_property_vt_empty(self):
+ db, db_path = init_database()
+ summary = db.GetSummaryInformation(0)
+ self.assertIsNone(summary.GetProperty(msilib.PID_SECURITY))
+ del db
+ self.addCleanup(unlink, db_path)
+
class Test_make_id(unittest.TestCase):
#http://msdn.microsoft.com/en-us/library/aa369212(v=vs.85).aspx