]> git.proxmox.com Git - mirror_edk2.git/blobdiff - AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_list.py
edk2: Remove AppPkg, StdLib, StdLibPrivateInternalFiles
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.2 / Lib / test / test_list.py
diff --git a/AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_list.py b/AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_list.py
deleted file mode 100644 (file)
index 8c77483..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-import sys\r
-from test import test_support, list_tests\r
-\r
-class ListTest(list_tests.CommonTest):\r
-    type2test = list\r
-\r
-    def test_basic(self):\r
-        self.assertEqual(list([]), [])\r
-        l0_3 = [0, 1, 2, 3]\r
-        l0_3_bis = list(l0_3)\r
-        self.assertEqual(l0_3, l0_3_bis)\r
-        self.assertTrue(l0_3 is not l0_3_bis)\r
-        self.assertEqual(list(()), [])\r
-        self.assertEqual(list((0, 1, 2, 3)), [0, 1, 2, 3])\r
-        self.assertEqual(list(''), [])\r
-        self.assertEqual(list('spam'), ['s', 'p', 'a', 'm'])\r
-\r
-        if sys.maxsize == 0x7fffffff:\r
-            # This test can currently only work on 32-bit machines.\r
-            # XXX If/when PySequence_Length() returns a ssize_t, it should be\r
-            # XXX re-enabled.\r
-            # Verify clearing of bug #556025.\r
-            # This assumes that the max data size (sys.maxint) == max\r
-            # address size this also assumes that the address size is at\r
-            # least 4 bytes with 8 byte addresses, the bug is not well\r
-            # tested\r
-            #\r
-            # Note: This test is expected to SEGV under Cygwin 1.3.12 or\r
-            # earlier due to a newlib bug.  See the following mailing list\r
-            # thread for the details:\r
-\r
-            #     http://sources.redhat.com/ml/newlib/2002/msg00369.html\r
-            self.assertRaises(MemoryError, list, xrange(sys.maxint // 2))\r
-\r
-        # This code used to segfault in Py2.4a3\r
-        x = []\r
-        x.extend(-y for y in x)\r
-        self.assertEqual(x, [])\r
-\r
-    def test_truth(self):\r
-        super(ListTest, self).test_truth()\r
-        self.assertTrue(not [])\r
-        self.assertTrue([42])\r
-\r
-    def test_identity(self):\r
-        self.assertTrue([] is not [])\r
-\r
-    def test_len(self):\r
-        super(ListTest, self).test_len()\r
-        self.assertEqual(len([]), 0)\r
-        self.assertEqual(len([0]), 1)\r
-        self.assertEqual(len([0, 1, 2]), 3)\r
-\r
-    def test_overflow(self):\r
-        lst = [4, 5, 6, 7]\r
-        n = int((sys.maxint*2+2) // len(lst))\r
-        def mul(a, b): return a * b\r
-        def imul(a, b): a *= b\r
-        self.assertRaises((MemoryError, OverflowError), mul, lst, n)\r
-        self.assertRaises((MemoryError, OverflowError), imul, lst, n)\r
-\r
-def test_main(verbose=None):\r
-    test_support.run_unittest(ListTest)\r
-\r
-    # verify reference counting\r
-    import sys\r
-    if verbose and hasattr(sys, "gettotalrefcount"):\r
-        import gc\r
-        counts = [None] * 5\r
-        for i in xrange(len(counts)):\r
-            test_support.run_unittest(ListTest)\r
-            gc.collect()\r
-            counts[i] = sys.gettotalrefcount()\r
-        print counts\r
-\r
-\r
-if __name__ == "__main__":\r
-    test_main(verbose=True)\r