MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_mismatched_parens

Method test_mismatched_parens

Lib/test/test_fstring.py:612–633  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

610 @unittest.expectedFailure # TODO: RUSTPYTHON
611 @unittest.skipIf(support.is_wasi, "exhausts limited stack on WASI")
612 def test_mismatched_parens(self):
613 self.assertAllRaise(SyntaxError, r"closing parenthesis '\}' "
614 r"does not match opening parenthesis '\('",
615 ["f'{((}'",
616 ])
617 self.assertAllRaise(SyntaxError, r"closing parenthesis '\)' "
618 r"does not match opening parenthesis '\['",
619 ["f'{a[4)}'",
620 ])
621 self.assertAllRaise(SyntaxError, r"closing parenthesis '\]' "
622 r"does not match opening parenthesis '\('",
623 ["f'{a(4]}'",
624 ])
625 self.assertAllRaise(SyntaxError, r"closing parenthesis '\}' "
626 r"does not match opening parenthesis '\['",
627 ["f'{a[4}'",
628 ])
629 self.assertAllRaise(SyntaxError, r"closing parenthesis '\}' "
630 r"does not match opening parenthesis '\('",
631 ["f'{a(4}'",
632 ])
633 self.assertRaises(SyntaxError, eval, "f'{" + "("*20 + "}'")
634
635 @unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: No exception raised
636 @unittest.skipIf(support.is_wasi, "exhausts limited stack on WASI")

Callers

nothing calls this directly

Calls 2

assertAllRaiseMethod · 0.95
assertRaisesMethod · 0.95

Tested by

no test coverage detected