From 764e6823a7632c2091db93da04c15900350ad524 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Salgado Date: Wed, 15 Sep 2021 19:16:51 +0100 Subject: bpo-45204: Reduce verbosity of test_peg_generator (GH-28360) --- Lib/test/test_peg_generator/test_pegen.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Lib/test/test_peg_generator/test_pegen.py b/Lib/test/test_peg_generator/test_pegen.py index 99c75f0..30e992e 100644 --- a/Lib/test/test_peg_generator/test_pegen.py +++ b/Lib/test/test_peg_generator/test_pegen.py @@ -797,25 +797,25 @@ class TestPegen(unittest.TestCase): | SOFT_KEYWORD l=NAME n=(NUMBER | NAME | STRING) { f"{l.string} = {n.string}"} """ parser_class = make_parser(grammar) - self.assertEqual(parse_string("number 1", parser_class, verbose=True), 1) - self.assertEqual(parse_string("string 'b'", parser_class, verbose=True), "'b'") + self.assertEqual(parse_string("number 1", parser_class), 1) + self.assertEqual(parse_string("string 'b'", parser_class), "'b'") self.assertEqual( - parse_string("number test 1", parser_class, verbose=True), "test = 1" + parse_string("number test 1", parser_class), "test = 1" ) assert ( - parse_string("string test 'b'", parser_class, verbose=True) == "test = 'b'" + parse_string("string test 'b'", parser_class) == "test = 'b'" ) with self.assertRaises(SyntaxError): - parse_string("test 1", parser_class, verbose=True) + parse_string("test 1", parser_class) def test_forced(self) -> None: grammar = """ start: NAME &&':' | NAME """ parser_class = make_parser(grammar) - self.assertTrue(parse_string("number :", parser_class, verbose=True)) + self.assertTrue(parse_string("number :", parser_class)) with self.assertRaises(SyntaxError) as e: - parse_string("a", parser_class, verbose=True) + parse_string("a", parser_class) self.assertIn("expected ':'", str(e.exception)) @@ -824,10 +824,10 @@ class TestPegen(unittest.TestCase): start: NAME &&(':' | ';') | NAME """ parser_class = make_parser(grammar) - self.assertTrue(parse_string("number :", parser_class, verbose=True)) - self.assertTrue(parse_string("number ;", parser_class, verbose=True)) + self.assertTrue(parse_string("number :", parser_class)) + self.assertTrue(parse_string("number ;", parser_class)) with self.assertRaises(SyntaxError) as e: - parse_string("a", parser_class, verbose=True) + parse_string("a", parser_class) self.assertIn("expected (':' | ';')", e.exception.args[0]) def test_unreachable_explicit(self) -> None: -- cgit v0.12