diff options
author | Guido van Rossum <guido@python.org> | 2002-08-22 19:45:32 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2002-08-22 19:45:32 (GMT) |
commit | 32c2ae7f4ac0594dc180efc8440f6a62eee164d6 (patch) | |
tree | 0962697cfac9fe58c1373dfd6e57b9fd11709fdf /Lib/test/test_parser.py | |
parent | 2e8bba5c2135e58dc2f32ff1062c39415bb266c4 (diff) | |
download | cpython-32c2ae7f4ac0594dc180efc8440f6a62eee164d6.zip cpython-32c2ae7f4ac0594dc180efc8440f6a62eee164d6.tar.gz cpython-32c2ae7f4ac0594dc180efc8440f6a62eee164d6.tar.bz2 |
Standardize behavior: no docstrings in test functions.
Diffstat (limited to 'Lib/test/test_parser.py')
-rw-r--r-- | Lib/test/test_parser.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Lib/test/test_parser.py b/Lib/test/test_parser.py index a28875e..c0b1bfc 100644 --- a/Lib/test/test_parser.py +++ b/Lib/test/test_parser.py @@ -9,6 +9,7 @@ from test import test_support # class RoundtripLegalSyntaxTestCase(unittest.TestCase): + def roundtrip(self, f, s): st1 = f(s) t = st1.totuple() @@ -134,6 +135,7 @@ class RoundtripLegalSyntaxTestCase(unittest.TestCase): # class IllegalSyntaxTestCase(unittest.TestCase): + def check_bad_tree(self, tree, label): try: parser.sequence2st(tree) @@ -147,7 +149,7 @@ class IllegalSyntaxTestCase(unittest.TestCase): self.check_bad_tree((1, 2, 3), "<junk>") def test_illegal_yield_1(self): - """Illegal yield statement: def f(): return 1; yield 1""" + # Illegal yield statement: def f(): return 1; yield 1 tree = \ (257, (264, @@ -202,7 +204,7 @@ class IllegalSyntaxTestCase(unittest.TestCase): self.check_bad_tree(tree, "def f():\n return 1\n yield 1") def test_illegal_yield_2(self): - """Illegal return in generator: def f(): return 1; yield 1""" + # Illegal return in generator: def f(): return 1; yield 1 tree = \ (257, (264, @@ -266,7 +268,7 @@ class IllegalSyntaxTestCase(unittest.TestCase): self.check_bad_tree(tree, "def f():\n return 1\n yield 1") def test_print_chevron_comma(self): - """Illegal input: print >>fp,""" + # Illegal input: print >>fp, tree = \ (257, (264, @@ -289,7 +291,7 @@ class IllegalSyntaxTestCase(unittest.TestCase): self.check_bad_tree(tree, "print >>fp,") def test_a_comma_comma_c(self): - """Illegal input: a,,c""" + # Illegal input: a,,c tree = \ (258, (311, @@ -316,7 +318,7 @@ class IllegalSyntaxTestCase(unittest.TestCase): self.check_bad_tree(tree, "a,,c") def test_illegal_operator(self): - """Illegal input: a $= b""" + # Illegal input: a $= b tree = \ (257, (264, |