From 2962517be0b0ac2732d371426d26c547333addee Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Fri, 24 Jul 2020 15:43:41 +0200 Subject: [PATCH] Get rid of the xfails --- test/test_pgen2.py | 14 +++++++++----- test/test_tokenize.py | 13 ++++--------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/test/test_pgen2.py b/test/test_pgen2.py index 958a5b1..1b82baa 100644 --- a/test/test_pgen2.py +++ b/test/test_pgen2.py @@ -75,11 +75,15 @@ def test_await_expr(works_in_py): """) -@pytest.mark.xfail(reason="acting like python 3.7") -def test_async_var(): - _parse("""async = 1""", "3.6") - _parse("""await = 1""", "3.6") - _parse("""def async(): pass""", "3.6") +@pytest.mark.parametrize( + 'code', [ + "async = 1", + "await = 1", + "def async(): pass", + ] +) +def test_async_var(works_not_in_py, code): + works_not_in_py.parse(code) def test_async_for(works_in_py): diff --git a/test/test_tokenize.py b/test/test_tokenize.py index f6173c0..23d9518 100644 --- a/test/test_tokenize.py +++ b/test/test_tokenize.py @@ -229,9 +229,6 @@ def test_endmarker_end_pos(): check('a\\') -xfail_py2 = dict(marks=[pytest.mark.xfail(sys.version_info[0] == 2, reason='Python 2')]) - - @pytest.mark.parametrize( ('code', 'types'), [ # Indentation @@ -243,12 +240,10 @@ xfail_py2 = dict(marks=[pytest.mark.xfail(sys.version_info[0] == 2, reason='Pyth # Name stuff ('1foo1', [NUMBER, NAME]), - pytest.param( - 'மெல்லினம்', [NAME], - **xfail_py2), - pytest.param('²', [ERRORTOKEN], **xfail_py2), - pytest.param('ä²ö', [NAME, ERRORTOKEN, NAME], **xfail_py2), - pytest.param('ää²¹öö', [NAME, ERRORTOKEN, NAME], **xfail_py2), + ('மெல்லினம்', [NAME]), + ('²', [ERRORTOKEN]), + ('ä²ö', [NAME, ERRORTOKEN, NAME]), + ('ää²¹öö', [NAME, ERRORTOKEN, NAME]), (' \x00a', [INDENT, ERRORTOKEN, NAME, DEDENT]), (dedent('''\ class BaseCache: