]> git.proxmox.com Git - mirror_edk2.git/blobdiff - AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_dbm.py
edk2: Remove AppPkg, StdLib, StdLibPrivateInternalFiles
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.2 / Lib / test / test_dbm.py
diff --git a/AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_dbm.py b/AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_dbm.py
deleted file mode 100644 (file)
index adfb171..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-from test import test_support\r
-import unittest\r
-dbm = test_support.import_module('dbm')\r
-\r
-class DbmTestCase(unittest.TestCase):\r
-\r
-    def setUp(self):\r
-        self.filename = test_support.TESTFN\r
-        self.d = dbm.open(self.filename, 'c')\r
-        self.d.close()\r
-\r
-    def tearDown(self):\r
-        for suffix in ['', '.pag', '.dir', '.db']:\r
-            test_support.unlink(self.filename + suffix)\r
-\r
-    def test_keys(self):\r
-        self.d = dbm.open(self.filename, 'c')\r
-        self.assertEqual(self.d.keys(), [])\r
-        a = [('a', 'b'), ('12345678910', '019237410982340912840198242')]\r
-        for k, v in a:\r
-            self.d[k] = v\r
-        self.assertEqual(sorted(self.d.keys()), sorted(k for (k, v) in a))\r
-        for k, v in a:\r
-            self.assertIn(k, self.d)\r
-            self.assertEqual(self.d[k], v)\r
-        self.assertNotIn('xxx', self.d)\r
-        self.assertRaises(KeyError, lambda: self.d['xxx'])\r
-        self.d.close()\r
-\r
-    def test_modes(self):\r
-        for mode in ['r', 'rw', 'w', 'n']:\r
-            try:\r
-                self.d = dbm.open(self.filename, mode)\r
-                self.d.close()\r
-            except dbm.error:\r
-                self.fail()\r
-\r
-def test_main():\r
-    test_support.run_unittest(DbmTestCase)\r
-\r
-if __name__ == '__main__':\r
-    test_main()\r