]> git.proxmox.com Git - mirror_edk2.git/blobdiff - AppPkg/Applications/Python/Python-2.7.2/Demo/parser/test_parser.py
edk2: Remove AppPkg, StdLib, StdLibPrivateInternalFiles
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.2 / Demo / parser / test_parser.py
diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/parser/test_parser.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/parser/test_parser.py
deleted file mode 100644 (file)
index f3f48b8..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-#! /usr/bin/env python\r
-#  (Force the script to use the latest build.)\r
-#\r
-#  test_parser.py\r
-\r
-import parser, traceback\r
-\r
-_numFailed = 0\r
-\r
-def testChunk(t, fileName):\r
-    global _numFailed\r
-    print '----', fileName,\r
-    try:\r
-        st = parser.suite(t)\r
-        tup = parser.st2tuple(st)\r
-        # this discards the first ST; a huge memory savings when running\r
-        # against a large source file like Tkinter.py.\r
-        st = None\r
-        new = parser.tuple2st(tup)\r
-    except parser.ParserError, err:\r
-        print\r
-        print 'parser module raised exception on input file', fileName + ':'\r
-        traceback.print_exc()\r
-        _numFailed = _numFailed + 1\r
-    else:\r
-        if tup != parser.st2tuple(new):\r
-            print\r
-            print 'parser module failed on input file', fileName\r
-            _numFailed = _numFailed + 1\r
-        else:\r
-            print 'o.k.'\r
-\r
-def testFile(fileName):\r
-    t = open(fileName).read()\r
-    testChunk(t, fileName)\r
-\r
-def test():\r
-    import sys\r
-    args = sys.argv[1:]\r
-    if not args:\r
-        import glob\r
-        args = glob.glob("*.py")\r
-        args.sort()\r
-    map(testFile, args)\r
-    sys.exit(_numFailed != 0)\r
-\r
-if __name__ == '__main__':\r
-    test()\r