/external/python/cpython3/Lib/test/ |
D | test_positional_only_arg.py | 7 from test.support import check_syntax_error 26 …check_syntax_error(self, "def f(a, b = 5, /, c): pass", "non-default argument follows default argu… 27 …check_syntax_error(self, "def f(a = 5, b, /, c): pass", "non-default argument follows default argu… 28 …check_syntax_error(self, "def f(a = 5, b=1, /, c, *, d=2): pass", "non-default argument follows de… 29 …check_syntax_error(self, "def f(a = 5, b, /): pass", "non-default argument follows default argumen… 30 check_syntax_error(self, "def f(*args, /): pass") 31 check_syntax_error(self, "def f(*args, a, /): pass") 32 check_syntax_error(self, "def f(**kwargs, /): pass") 33 check_syntax_error(self, "def f(/, a = 1): pass") 34 check_syntax_error(self, "def f(/, a): pass") [all …]
|
D | test_global.py | 3 from test.support import run_unittest, check_syntax_error, check_warnings 27 check_syntax_error(self, prog_text_1, lineno=4, offset=5) 35 check_syntax_error(self, prog_text_2, lineno=3, offset=5) 44 check_syntax_error(self, prog_text_3, lineno=4, offset=5)
|
D | test_grammar.py | 4 from test.support import check_syntax_error, check_syntax_warning, use_old_parser 104 from test.support import check_syntax_error 191 check = self.check_syntax_error 279 from test.support import check_syntax_error, check_syntax_warning 308 check_syntax_error(self, "def f: int") 309 check_syntax_error(self, "x: int: str") 310 check_syntax_error(self, "def f():\n" 313 check_syntax_error(self, "[x, 0]: int\n") 314 check_syntax_error(self, "f(): int\n") 315 check_syntax_error(self, "(x,): int") [all …]
|
D | test_future.py | 20 def check_syntax_error(self, err, basename, lineno, offset=1): member in FutureTest 43 self.check_syntax_error(cm.exception, "badsyntax_future3", 3) 48 self.check_syntax_error(cm.exception, "badsyntax_future4", 3) 53 self.check_syntax_error(cm.exception, "badsyntax_future5", 4) 58 self.check_syntax_error(cm.exception, "badsyntax_future6", 3) 63 self.check_syntax_error(cm.exception, "badsyntax_future7", 3, 53) 68 self.check_syntax_error(cm.exception, "badsyntax_future8", 3) 73 self.check_syntax_error(cm.exception, "badsyntax_future9", 3) 78 self.check_syntax_error(cm.exception, "badsyntax_future10", 3)
|
D | test_scope.py | 4 from test.support import check_syntax_error, cpython_only 197 check_syntax_error(self, """if 1: 205 check_syntax_error(self, """if 1: 213 check_syntax_error(self, """if 1: 222 check_syntax_error(self, """if 1:
|
D | test_support.py | 284 support.check_syntax_error(self, "def class", lineno=1, offset=5) 286 support.check_syntax_error(self, "x=1")
|
/external/python/cpython2/Lib/test/ |
D | test_global.py | 3 from test.test_support import run_unittest, check_syntax_error 18 check_syntax_error(self, prog_text_1) 26 check_syntax_error(self, prog_text_2) 35 check_syntax_error(self, prog_text_3)
|
D | test_grammar.py | 4 from test.test_support import run_unittest, check_syntax_error, \ 323 check_syntax_error(self, "f(*g(1=2))") 324 check_syntax_error(self, "f(**g(1=2))") 341 check_syntax_error(self, "lambda x: x = 2") 344 check_syntax_error(self, "lambda (None,): None") 374 check_syntax_error(self, "x + 1 = 1") 375 check_syntax_error(self, "a + 1 = b + 2") 444 check_syntax_error(self, 'print ,') 445 check_syntax_error(self, 'print >> x,') 525 check_syntax_error(self, "class foo:return 1") [all …]
|
D | test_scope.py | 2 from test.test_support import check_syntax_error, check_py3k_warnings, \ 185 check_syntax_error(self, """\ 193 check_syntax_error(self, """\ 201 check_syntax_error(self, """\ 211 check_syntax_error(self, """\ 219 check_syntax_error(self, """\ 226 check_syntax_error(self, """\
|
D | test_test_support.py | 292 support.check_syntax_error(self, "def class", lineno=1, offset=9) 294 support.check_syntax_error(self, "x=1")
|
/external/python/cpython3/Lib/lib2to3/tests/data/ |
D | py2_test_grammar.py | 11 from test.test_support import run_unittest, check_syntax_error 294 check_syntax_error(self, "f(*g(1=2))") 295 check_syntax_error(self, "f(**g(1=2))") 309 check_syntax_error(self, "lambda x: x = 2") 310 check_syntax_error(self, "lambda (None,): None") 336 check_syntax_error(self, "x + 1 = 1") 337 check_syntax_error(self, "a + 1 = b + 2") 406 check_syntax_error(self, 'print ,') 407 check_syntax_error(self, 'print >> x,') 487 check_syntax_error(self, "class foo:return 1") [all …]
|
D | py3_test_grammar.py | 11 from test.support import run_unittest, check_syntax_error 354 check_syntax_error(self, "f(*g(1=2))") 355 check_syntax_error(self, "f(**g(1=2))") 369 check_syntax_error(self, "lambda x: x = 2") 370 check_syntax_error(self, "lambda (None,): None") 400 check_syntax_error(self, "x + 1 = 1") 401 check_syntax_error(self, "a + 1 = b + 2") 484 check_syntax_error(self, "class foo:return 1") 495 check_syntax_error(self, "class foo:yield 1") 496 check_syntax_error(self, "def g4(): yield from *a") [all …]
|
/external/python/cpython2/Lib/lib2to3/tests/data/ |
D | py2_test_grammar.py | 11 from test.test_support import run_unittest, check_syntax_error 294 check_syntax_error(self, "f(*g(1=2))") 295 check_syntax_error(self, "f(**g(1=2))") 309 check_syntax_error(self, "lambda x: x = 2") 310 check_syntax_error(self, "lambda (None,): None") 336 check_syntax_error(self, "x + 1 = 1") 337 check_syntax_error(self, "a + 1 = b + 2") 406 check_syntax_error(self, 'print ,') 407 check_syntax_error(self, 'print >> x,') 487 check_syntax_error(self, "class foo:return 1") [all …]
|
D | py3_test_grammar.py | 11 from test.support import run_unittest, check_syntax_error 330 check_syntax_error(self, "f(*g(1=2))") 331 check_syntax_error(self, "f(**g(1=2))") 345 check_syntax_error(self, "lambda x: x = 2") 346 check_syntax_error(self, "lambda (None,): None") 376 check_syntax_error(self, "x + 1 = 1") 377 check_syntax_error(self, "a + 1 = b + 2") 457 check_syntax_error(self, "class foo:return 1") 460 check_syntax_error(self, "class foo:yield 1") 787 check_syntax_error(self, "[i, s for i in nums for s in strs]") [all …]
|
/external/python/cpython3/Lib/test/support/ |
D | __init__.py | 1021 def check_syntax_error(testcase, statement, errtext='', *, lineno=None, offset=None): function 1053 check_syntax_error(testcase, statement, errtext,
|
/external/python/cpython2/Lib/test/support/ |
D | __init__.py | 854 def check_syntax_error(testcase, statement, errtext='', lineno=None, offset=None): function
|
/external/python/cpython3/Doc/library/ |
D | test.rst | 1023 .. function:: check_syntax_error(testcase, statement, errtext='', *, lineno=None, offset=None)
|