summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_peg_generator
diff options
context:
space:
mode:
authorLysandros Nikolaou <lisandrosnik@gmail.com>2020-04-23 12:22:16 (GMT)
committerGitHub <noreply@github.com>2020-04-23 12:22:16 (GMT)
commit8d1cbfffea7a5dbf7a3c60b066a2c2120ef08cd0 (patch)
tree9548588a1003e307f1889bb4f429ef117ed5ede5 /Lib/test/test_peg_generator
parent1df5a9e88c8df1495a2e689d71b34bf0c7d008ea (diff)
downloadcpython-8d1cbfffea7a5dbf7a3c60b066a2c2120ef08cd0.zip
cpython-8d1cbfffea7a5dbf7a3c60b066a2c2120ef08cd0.tar.gz
cpython-8d1cbfffea7a5dbf7a3c60b066a2c2120ef08cd0.tar.bz2
bpo-40334: Suppress all output in test_peg_generator (GH-19675)
Diffstat (limited to 'Lib/test/test_peg_generator')
-rw-r--r--Lib/test/test_peg_generator/test_c_parser.py1
-rw-r--r--Lib/test/test_peg_generator/test_pegen.py5
2 files changed, 1 insertions, 5 deletions
diff --git a/Lib/test/test_peg_generator/test_c_parser.py b/Lib/test/test_peg_generator/test_c_parser.py
index f2f699c..6682c90 100644
--- a/Lib/test/test_peg_generator/test_c_parser.py
+++ b/Lib/test/test_peg_generator/test_c_parser.py
@@ -295,7 +295,6 @@ class TestCParser(unittest.TestCase):
expr: NAME
"""
grammar = parse_string(grammar_source, GrammarParser)
- print(list(Path(self.tmp_path).iterdir()))
extension = generate_parser_c_extension(grammar, Path(self.tmp_path))
for text in ("a b 42 b a", "名 名 42 名 名"):
try:
diff --git a/Lib/test/test_peg_generator/test_pegen.py b/Lib/test/test_peg_generator/test_pegen.py
index 581c7ac..0a2a6d4 100644
--- a/Lib/test/test_peg_generator/test_pegen.py
+++ b/Lib/test/test_peg_generator/test_pegen.py
@@ -81,7 +81,6 @@ class TestPegen(unittest.TestCase):
"""
rules = parse_string(grammar, GrammarParser).rules
self.assertEqual(str(rules["start"]), "start: ','.thing+ NEWLINE")
- print(repr(rules["start"]))
self.assertTrue(repr(rules["start"]).startswith(
"Rule('start', None, Rhs([Alt([NamedItem(None, Gather(StringLeaf(\"','\"), NameLeaf('thing'"
))
@@ -511,7 +510,7 @@ class TestPegen(unittest.TestCase):
expr: NUMBER
"""
parser_class = make_parser(grammar)
- node = parse_string("(1)", parser_class, verbose=True)
+ node = parse_string("(1)", parser_class)
self.assertEqual(node, [
TokenInfo(OP, string="(", start=(1, 0), end=(1, 1), line="(1)"),
[TokenInfo(NUMBER, string="1", start=(1, 1), end=(1, 2), line="(1)")],
@@ -695,8 +694,6 @@ class TestGrammarVisualizer(unittest.TestCase):
printer.print_grammar_ast(rules, printer=lines.append)
output = "\n".join(lines)
- print()
- print(output)
expected_output = textwrap.dedent(
"""\
└──Rule