8000 bpo-40334: Suppress all output in test_peg_generator (GH-19675) · python/cpython@8d1cbff · GitHub
[go: up one dir, main page]

Skip to content

Commit 8d1cbff

Browse files
authored
bpo-40334: Suppress all output in test_peg_generator (GH-19675)
1 parent 1df5a9e commit 8d1cbff

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

Lib/test/test_peg_generator/test_c_parser.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,6 @@ def test_syntax_error_for_string(self) -> None:
295295
expr: NAME
296296
"""
297297
grammar = parse_string(grammar_source, GrammarParser)
298-
print(list(Path(self.tmp_path).iterdir()))
299298
extension = generate_parser_c_extension(grammar, Path(self.tmp_path))
300299
for text in ("a b 42 b a", "名 名 42 名 名"):
301300
try:

Lib/test/test_peg_generator/test_pegen.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ def test_repeat_with_separator_rules(self) -> None:
8181
"""
8282
rules = parse_string(grammar, GrammarParser).rules
8383
self.assertEqual(str(rules["start"]), "start: ','.thing+ NEWLINE")
84-
print(repr(rules["start"]))
8584
self.assertTrue(repr(rules["start"]).startswith(
8685
"Rule('start', None, Rhs([Alt([NamedItem(None, Gather(StringLeaf(\"','\"), NameLeaf('thing'"
8786
))
@@ -511,7 +510,7 @@ def test_cut(self) -> None:
511510
expr: NUMBER
512511
"""
513512
parser_class = make_parser(grammar)
514-
node = parse_string("(1)", parser_class, verbose=True)
513+
node = parse_string("(1)", parser_class)
515514
self.assertEqual(node, [
516515
TokenInfo(OP, string="(", start=(1, 0), end=(1, 1), line="(1)"),
517516
[TokenInfo(NUMBER, string="1", start=(1, 1), end=(1, 2), line="(1)")],
@@ -695,8 +694,6 @@ def test_deep_nested_rule(self) -> None:
695694
printer.print_grammar_ast(rules, printer=lines.append)
696695

697696
output = "\n".join(lines)
698-
print()
699-
print(output)
700697
expected_output = textwrap.dedent(
701698
"""\
702699
└──Rule

0 commit comments

Comments
 (0)
0