]> git.proxmox.com Git - mirror_edk2.git/blobdiff - AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_filelist.py
edk2: Remove AppPkg, StdLib, StdLibPrivateInternalFiles
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.2 / Lib / distutils / tests / test_filelist.py
diff --git a/AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_filelist.py b/AppPkg/Applications/Python/Python-2.7.2/Lib/distutils/tests/test_filelist.py
deleted file mode 100644 (file)
index c2921a0..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-"""Tests for distutils.filelist."""\r
-from os.path import join\r
-import unittest\r
-from test.test_support import captured_stdout, run_unittest\r
-\r
-from distutils.filelist import glob_to_re, FileList\r
-from distutils import debug\r
-\r
-MANIFEST_IN = """\\r
-include ok\r
-include xo\r
-exclude xo\r
-include foo.tmp\r
-global-include *.x\r
-global-include *.txt\r
-global-exclude *.tmp\r
-recursive-include f *.oo\r
-recursive-exclude global *.x\r
-graft dir\r
-prune dir3\r
-"""\r
-\r
-class FileListTestCase(unittest.TestCase):\r
-\r
-    def test_glob_to_re(self):\r
-        # simple cases\r
-        self.assertEqual(glob_to_re('foo*'), 'foo[^/]*\\Z(?ms)')\r
-        self.assertEqual(glob_to_re('foo?'), 'foo[^/]\\Z(?ms)')\r
-        self.assertEqual(glob_to_re('foo??'), 'foo[^/][^/]\\Z(?ms)')\r
-\r
-        # special cases\r
-        self.assertEqual(glob_to_re(r'foo\\*'), r'foo\\\\[^/]*\Z(?ms)')\r
-        self.assertEqual(glob_to_re(r'foo\\\*'), r'foo\\\\\\[^/]*\Z(?ms)')\r
-        self.assertEqual(glob_to_re('foo????'), r'foo[^/][^/][^/][^/]\Z(?ms)')\r
-        self.assertEqual(glob_to_re(r'foo\\??'), r'foo\\\\[^/][^/]\Z(?ms)')\r
-\r
-    def test_process_template_line(self):\r
-        # testing  all MANIFEST.in template patterns\r
-        file_list = FileList()\r
-\r
-        # simulated file list\r
-        file_list.allfiles = ['foo.tmp', 'ok', 'xo', 'four.txt',\r
-                              join('global', 'one.txt'),\r
-                              join('global', 'two.txt'),\r
-                              join('global', 'files.x'),\r
-                              join('global', 'here.tmp'),\r
-                              join('f', 'o', 'f.oo'),\r
-                              join('dir', 'graft-one'),\r
-                              join('dir', 'dir2', 'graft2'),\r
-                              join('dir3', 'ok'),\r
-                              join('dir3', 'sub', 'ok.txt')\r
-                              ]\r
-\r
-        for line in MANIFEST_IN.split('\n'):\r
-            if line.strip() == '':\r
-                continue\r
-            file_list.process_template_line(line)\r
-\r
-        wanted = ['ok', 'four.txt', join('global', 'one.txt'),\r
-                  join('global', 'two.txt'), join('f', 'o', 'f.oo'),\r
-                  join('dir', 'graft-one'), join('dir', 'dir2', 'graft2')]\r
-\r
-        self.assertEqual(file_list.files, wanted)\r
-\r
-    def test_debug_print(self):\r
-        file_list = FileList()\r
-        with captured_stdout() as stdout:\r
-            file_list.debug_print('xxx')\r
-        stdout.seek(0)\r
-        self.assertEqual(stdout.read(), '')\r
-\r
-        debug.DEBUG = True\r
-        try:\r
-            with captured_stdout() as stdout:\r
-                file_list.debug_print('xxx')\r
-            stdout.seek(0)\r
-            self.assertEqual(stdout.read(), 'xxx\n')\r
-        finally:\r
-            debug.DEBUG = False\r
-\r
-def test_suite():\r
-    return unittest.makeSuite(FileListTestCase)\r
-\r
-if __name__ == "__main__":\r
-    run_unittest(test_suite())\r