]> git.proxmox.com Git - mirror_edk2.git/blobdiff - AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_dep_util.py
edk2: Remove AppPkg, StdLib, StdLibPrivateInternalFiles
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.2 / Lib / distutils / tests / test_dep_util.py
diff --git a/AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_dep_util.py b/AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_dep_util.py
deleted file mode 100644 (file)
index 53f33d4..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-"""Tests for distutils.dep_util."""\r
-import unittest\r
-import os\r
-import time\r
-\r
-from distutils.dep_util import newer, newer_pairwise, newer_group\r
-from distutils.errors import DistutilsFileError\r
-from distutils.tests import support\r
-from test.test_support import run_unittest\r
-\r
-class DepUtilTestCase(support.TempdirManager, unittest.TestCase):\r
-\r
-    def test_newer(self):\r
-\r
-        tmpdir = self.mkdtemp()\r
-        new_file = os.path.join(tmpdir, 'new')\r
-        old_file = os.path.abspath(__file__)\r
-\r
-        # Raise DistutilsFileError if 'new_file' does not exist.\r
-        self.assertRaises(DistutilsFileError, newer, new_file, old_file)\r
-\r
-        # Return true if 'new_file' exists and is more recently modified than\r
-        # 'old_file', or if 'new_file' exists and 'old_file' doesn't.\r
-        self.write_file(new_file)\r
-        self.assertTrue(newer(new_file, 'I_dont_exist'))\r
-        self.assertTrue(newer(new_file, old_file))\r
-\r
-        # Return false if both exist and 'old_file' is the same age or younger\r
-        # than 'new_file'.\r
-        self.assertFalse(newer(old_file, new_file))\r
-\r
-    def test_newer_pairwise(self):\r
-        tmpdir = self.mkdtemp()\r
-        sources = os.path.join(tmpdir, 'sources')\r
-        targets = os.path.join(tmpdir, 'targets')\r
-        os.mkdir(sources)\r
-        os.mkdir(targets)\r
-        one = os.path.join(sources, 'one')\r
-        two = os.path.join(sources, 'two')\r
-        three = os.path.abspath(__file__)    # I am the old file\r
-        four = os.path.join(targets, 'four')\r
-        self.write_file(one)\r
-        self.write_file(two)\r
-        self.write_file(four)\r
-\r
-        self.assertEqual(newer_pairwise([one, two], [three, four]),\r
-                         ([one],[three]))\r
-\r
-    def test_newer_group(self):\r
-        tmpdir = self.mkdtemp()\r
-        sources = os.path.join(tmpdir, 'sources')\r
-        os.mkdir(sources)\r
-        one = os.path.join(sources, 'one')\r
-        two = os.path.join(sources, 'two')\r
-        three = os.path.join(sources, 'three')\r
-        old_file = os.path.abspath(__file__)\r
-\r
-        # return true if 'old_file' is out-of-date with respect to any file\r
-        # listed in 'sources'.\r
-        self.write_file(one)\r
-        self.write_file(two)\r
-        self.write_file(three)\r
-        self.assertTrue(newer_group([one, two, three], old_file))\r
-        self.assertFalse(newer_group([one, two, old_file], three))\r
-\r
-        # missing handling\r
-        os.remove(one)\r
-        self.assertRaises(OSError, newer_group, [one, two, old_file], three)\r
-\r
-        self.assertFalse(newer_group([one, two, old_file], three,\r
-                                     missing='ignore'))\r
-\r
-        self.assertTrue(newer_group([one, two, old_file], three,\r
-                                    missing='newer'))\r
-\r
-\r
-def test_suite():\r
-    return unittest.makeSuite(DepUtilTestCase)\r
-\r
-if __name__ == "__main__":\r
-    run_unittest(test_suite())\r