def assertCompilesTo(self, source, expected_result): self.assertEqual(lython_compile(source), expected_result)
def test_extra_opening(self): with self.assertRaises(ParsingError): lython_compile("(")
def test_extra_closing(self): with self.assertRaises(ParsingError): lython_compile("(foo))")