[Python-checkins] r41979 - python/trunk/Lib/test/outstanding_bugs.py

reinhold.birkenfeld python-checkins at python.org
Sun Jan 8 15:32:25 CET 2006


Author: reinhold.birkenfeld
Date: Sun Jan  8 15:32:19 2006
New Revision: 41979

Added:
   python/trunk/Lib/test/outstanding_bugs.py
Log:
Add a test file (which isn't run by regrtest) for bugs which
aren't fixed yet.

Includes a first test (for compiler).



Added: python/trunk/Lib/test/outstanding_bugs.py
==============================================================================
--- (empty file)
+++ python/trunk/Lib/test/outstanding_bugs.py	Sun Jan  8 15:32:19 2006
@@ -0,0 +1,24 @@
+#
+# This file is for everybody to add tests for bugs that aren't
+# fixed yet. Please add a test case and appropriate bug description.
+#
+# When you fix one of the bugs, please move the test to the correct
+# test_ module.
+#
+
+import unittest
+from test import test_support
+
+class TestBug1385040(unittest.TestCase):
+    def testSyntaxError(self):
+        import compiler
+        
+        # The following snippet gives a SyntaxError in the interpreter
+        # 
+        # If you compile and exec it, the call foo(7) returns (7, 1)
+        self.assertRaises(SyntaxError, compiler.compile,
+                          "def foo(a=1, b): return a, b\n\n", "<string>", "exec")
+
+
+def test_main():
+    test_support.run_unittest(TestBug1385040)


More information about the Python-checkins mailing list