summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_peg_generator
diff options
context:
space:
mode:
authorPablo Galindo Salgado <Pablogsal@gmail.com>2021-09-15 18:16:51 (GMT)
committerGitHub <noreply@github.com>2021-09-15 18:16:51 (GMT)
commit764e6823a7632c2091db93da04c15900350ad524 (patch)
treeff9b9ee268ae962c4a8209a58fb5806766721c0a /Lib/test/test_peg_generator
parent09b4ad11f323f8702cde795e345b75e0fbb1a9a5 (diff)
downloadcpython-764e6823a7632c2091db93da04c15900350ad524.zip
cpython-764e6823a7632c2091db93da04c15900350ad524.tar.gz
cpython-764e6823a7632c2091db93da04c15900350ad524.tar.bz2
bpo-45204: Reduce verbosity of test_peg_generator (GH-28360)
Diffstat (limited to 'Lib/test/test_peg_generator')
-rw-r--r--Lib/test/test_peg_generator/test_pegen.py20
1 files 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: