Home
last modified time | relevance | path

Searched refs:check_syntax_error (Results 1 – 16 of 16) sorted by relevance

/external/python/cpython3/Lib/test/
Dtest_grammar.py4 from test.support import check_syntax_error
281 check_syntax_error(self, "def f: int")
282 check_syntax_error(self, "x: int: str")
283 check_syntax_error(self, "def f():\n"
286 check_syntax_error(self, "[x, 0]: int\n")
287 check_syntax_error(self, "f(): int\n")
288 check_syntax_error(self, "(x,): int")
289 check_syntax_error(self, "def f():\n"
292 check_syntax_error(self, "def f():\n"
295 check_syntax_error(self, "def f():\n"
[all …]
Dtest_future.py18 def check_syntax_error(self, err, basename, lineno, offset=0): member in FutureTest
41 self.check_syntax_error(cm.exception, "badsyntax_future3", 3)
46 self.check_syntax_error(cm.exception, "badsyntax_future4", 3)
51 self.check_syntax_error(cm.exception, "badsyntax_future5", 4)
56 self.check_syntax_error(cm.exception, "badsyntax_future6", 3)
61 self.check_syntax_error(cm.exception, "badsyntax_future7", 3, 53)
66 self.check_syntax_error(cm.exception, "badsyntax_future8", 3)
71 self.check_syntax_error(cm.exception, "badsyntax_future9", 3, 0)
76 self.check_syntax_error(cm.exception, "badsyntax_future10", 3, 0)
Dtest_global.py3 from test.support import run_unittest, check_syntax_error, check_warnings
27 check_syntax_error(self, prog_text_1, lineno=4, offset=4)
35 check_syntax_error(self, prog_text_2, lineno=3, offset=4)
44 check_syntax_error(self, prog_text_3, lineno=4, offset=4)
Dtest_scope.py4 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:
Dtest_support.py289 support.check_syntax_error(self, "def class", lineno=1, offset=9)
291 support.check_syntax_error(self, "x=1")
/external/python/cpython2/Lib/test/
Dtest_global.py3 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)
Dtest_grammar.py4 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 …]
Dtest_scope.py2 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, """\
Dtest_test_support.py292 support.check_syntax_error(self, "def class", lineno=1, offset=9)
294 support.check_syntax_error(self, "x=1")
/external/python/cpython2/Lib/lib2to3/tests/data/
Dpy2_test_grammar.py11 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 …]
Dpy3_test_grammar.py11 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/lib2to3/tests/data/
Dpy2_test_grammar.py11 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 …]
Dpy3_test_grammar.py11 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")
481 check_syntax_error(self, "class foo:return 1")
484 check_syntax_error(self, "class foo:yield 1")
811 check_syntax_error(self, "[i, s for i in nums for s in strs]")
[all …]
/external/python/cpython2/Lib/test/support/
D__init__.py854 def check_syntax_error(testcase, statement, errtext='', lineno=None, offset=None): function
/external/python/cpython3/Lib/test/support/
D__init__.py1101 def check_syntax_error(testcase, statement, *, lineno=None, offset=None): function
/external/python/cpython3/Doc/library/
Dtest.rst939 .. function:: check_syntax_error(testcase, statement, errtext='', *, lineno=None, offset=None)