我们从Python开源项目中,提取了以下8个代码示例,用于说明如何使用test.badsyntax_future9()。
def test_badfuture9(self): try: from test import badsyntax_future9 except SyntaxError as msg: self.assertEqual(get_error_location(msg), ("badsyntax_future9", '3')) else: self.fail("expected exception didn't occur")
def test_badfuture9(self): try: from test import badsyntax_future9 except SyntaxError, msg: self.assertEqual(get_error_location(msg), ("badsyntax_future9", '3')) else: self.fail("expected exception didn't occur")