Skip to content

Test failures with Python 3.9.0b1 #549

@hroncok

Description

@hroncok
$ tox -e py39
GLOB sdist-make: .../PyCQA/pyflakes/setup.py
py39 inst-nodeps: .../PyCQA/pyflakes/.tox/.tmp/package/1/pyflakes-2.2.0.zip
py39 installed: flake8==3.6.0,mccabe==0.6.1,pycodestyle==2.4.0,pyflakes==2.2.0
py39 run-test-pre: PYTHONHASHSEED='3762849954'
py39 run-test: commands[0] | python -m unittest discover pyflakes
......F....FFF........................s..........................s.......s....................s..............................s...s.............s...............................s...............................................s....s..................s......s..............................................s............ss..s.........s.s.................s...s.............s...............................s...............................................................................................................s....s..................s......s.................s............................................s.....................sss............................................................................s............ss..s.........s.s.
======================================================================
FAIL: test_invalidEscape (test.test_api.CheckTests)
The invalid escape syntax raises ValueError in Python 2
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../PyCQA/pyflakes/pyflakes/test/test_api.py", line 599, in test_invalidEscape
    self.assertHasErrors(
  File ".../PyCQA/pyflakes/pyflakes/test/test_api.py", line 379, in assertHasErrors
    self.assertEqual(
AssertionError: Tuples differ: (1, "[14 chars]5_:1:13: (unicode error) 'unicodeescape' codec[88 chars]^\n") != (1, "[14 chars]5_:1:7: (unicode error) 'unicodeescape' codec [81 chars]^\n")

First differing element 1:
"/tmp/tmps32en05_:1:13: (unicode error) 'unicodeescape' codec[87 chars] ^\n"
"/tmp/tmps32en05_:1:7: (unicode error) 'unicodeescape' codec [80 chars] ^\n"

  (1,
-  "/tmp/tmps32en05_:1:13: (unicode error) 'unicodeescape' codec can't decode "
?                      ^^

+  "/tmp/tmps32en05_:1:7: (unicode error) 'unicodeescape' codec can't decode "
?                      ^

   'bytes in position 0-1: truncated \\xXX escape\n'
   "foo = '\\xyz'\n"
-  '            ^\n')
?   ------

+  '      ^\n')

======================================================================
FAIL: test_multilineSyntaxError (test.test_api.CheckTests)
Source which includes a syntax error which results in the raised
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../PyCQA/pyflakes/pyflakes/test/test_api.py", line 458, in test_multilineSyntaxError
    self.assertHasErrors(
  File ".../PyCQA/pyflakes/pyflakes/test/test_api.py", line 379, in assertHasErrors
    self.assertEqual(
AssertionError: Tuples differ: (1, "/tmp/tmpjs72k5vs:8:8: invalid syntax\n    '''quux'''\n       ^\n") != (1, "/tmp/tmpjs72k5vs:8:8: invalid string prefix\n    '''quux'''\n       ^\n")

First differing element 1:
"/tmp/tmpjs72k5vs:8:8: invalid syntax\n    '''quux'''\n       ^\n"
"/tmp/tmpjs72k5vs:8:8: invalid string prefix\n    '''quux'''\n       ^\n"

- (1, "/tmp/tmpjs72k5vs:8:8: invalid syntax\n    '''quux'''\n       ^\n")
?                                     ^ ^^

+ (1, "/tmp/tmpjs72k5vs:8:8: invalid string prefix\n    '''quux'''\n       ^\n")
?                                     ^^^ ^^^^^^^


======================================================================
FAIL: test_nonDefaultFollowsDefaultSyntaxError (test.test_api.CheckTests)
Source which has a non-default argument following a default argument
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../PyCQA/pyflakes/pyflakes/test/test_api.py", line 528, in test_nonDefaultFollowsDefaultSyntaxError
    self.assertHasErrors(
  File ".../PyCQA/pyflakes/pyflakes/test/test_api.py", line 379, in assertHasErrors
    self.assertEqual(
AssertionError: Tuples differ: (1, '[14 chars]n2:1:21: non-default argument follows default [54 chars]^\n') != (1, '[14 chars]n2:1:9: non-default argument follows default a[41 chars]^\n')

First differing element 1:
'/tmp/tmpms87axn2:1:21: non-default argument follows default [53 chars] ^\n'
'/tmp/tmpms87axn2:1:9: non-default argument follows default a[40 chars] ^\n'

  (1,
-  '/tmp/tmpms87axn2:1:21: non-default argument follows default argument\n'
?                      ^^

+  '/tmp/tmpms87axn2:1:9: non-default argument follows default argument\n'
?                      ^

   'def foo(bar=baz, bax):\n'
-  '                    ^\n')
+  '        ^\n')

======================================================================
FAIL: test_nonKeywordAfterKeywordSyntaxError (test.test_api.CheckTests)
Source which has a non-keyword argument after a keyword argument should
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../PyCQA/pyflakes/pyflakes/test/test_api.py", line 562, in test_nonKeywordAfterKeywordSyntaxError
    self.assertHasErrors(
  File ".../PyCQA/pyflakes/pyflakes/test/test_api.py", line 379, in assertHasErrors
    self.assertEqual(
AssertionError: Tuples differ: (1, '[15 chars]t:1:17: positional argument follows keyword ar[43 chars]^\n') != (1, '[15 chars]t:1:14: positional argument follows keyword ar[40 chars]^\n')

First differing element 1:
'/tmp/tmpqv6chdyt:1:17: positional argument follows keyword ar[42 chars] ^\n'
'/tmp/tmpqv6chdyt:1:14: positional argument follows keyword ar[39 chars] ^\n'

  (1,
-  '/tmp/tmpqv6chdyt:1:17: positional argument follows keyword argument\n'
?                       ^

+  '/tmp/tmpqv6chdyt:1:14: positional argument follows keyword argument\n'
?                       ^

   'foo(bar=baz, bax)\n'
-  '                ^\n')
?   ---

+  '             ^\n')

----------------------------------------------------------------------
Ran 736 tests in 0.975s

FAILED (failures=4, skipped=37)
ERROR: InvocationError for command .../PyCQA/pyflakes/.tox/py39/bin/python -m unittest discover pyflakes (exited with code 1)
___________________________________ summary ____________________________________
ERROR:   py39: commands failed

This is on master @ cd261ab

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions