From c3aab1b1485d1b61566219e7273553dcaded3fc1 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Sat, 5 Aug 2017 22:55:12 +0200 Subject: [PATCH] Finally able to delete a function because all the tests were generalized. --- test/test_python_errors.py | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/test/test_python_errors.py b/test/test_python_errors.py index 4c5b03a..6d7013e 100644 --- a/test/test_python_errors.py +++ b/test/test_python_errors.py @@ -246,7 +246,10 @@ GLOBAL_NONLOCAL_ERROR = [ if sys.version_info >= (3, 6): FAILING_EXAMPLES += GLOBAL_NONLOCAL_ERROR - FAILING_EXAMPLES.append('(%s *d) = x' % ('a,' * 256)) + FAILING_EXAMPLES += [ + '(%s *d) = x' % ('a,' * 256), + 'async def foo():\n def nofoo():[x async for x in []]', + ] if sys.version_info >= (3, 5): FAILING_EXAMPLES += [ '[*[] for a in [1]]', @@ -397,20 +400,6 @@ def test_default_except_error_postition(): assert error.start_pos[0] == 2 -@pytest.mark.parametrize( - ('code', 'version'), [ - ('async def foo():\n def nofoo():[x async for x in []]', '3.6'), - ] -) -def test_python_exception_matches_version(code, version): - if '.'.join(str(v) for v in sys.version_info[:2]) != version: - pytest.skip() - - wanted, line_nr = _get_actual_exception(code) - error, = _get_error_list(code) - assert error.message in wanted - - def test_statically_nested_blocks(): def build(code, depth): if depth == 0: