py3flakes test suite failure

Bug #1132910 reported by Dimitri John Ledkov
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Pyflakes
Invalid
Undecided
Unassigned

Bug Description

======================================================================
FAIL: test_invalidEscape (pyflakes.test.test_api.CheckTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tdlk/personal-src/python/python-apps/packages/pyflakes/build-area/pyflakes-0.6.1/pyflakes/test/test_api.py", line 414, in test_invalidEscape
    sourcePath, [decoding_error])
  File "/home/tdlk/personal-src/python/python-apps/packages/pyflakes/build-area/pyflakes-0.6.1/pyflakes/test/test_api.py", line 263, in assertHasErrors
    (count, err.getvalue()), (len(errorList), ''.join(errorList)))
AssertionError: Tuples differ: (1, "/tmp/tmpuzz1ow:1: (unicod... != (1, "/tmp/tmpuzz1ow:1: (unicod...

First differing element 1:
/tmp/tmpuzz1ow:1: (unicode error) 'unicodeescape' codec can't decode bytes in position 0-1: truncated \xXX escape
foo = '\xyz'
       ^

/tmp/tmpuzz1ow:1: (unicode error) 'unicodeescape' codec can't decode bytes in position 0-2: truncated \xXX escape
foo = '\xyz'
       ^

  (1,
- "/tmp/tmpuzz1ow:1: (unicode error) 'unicodeescape' codec can't decode bytes in position 0-1: truncated \\xXX escape\nfoo = '\\xyz'\n ^\n")
? ^

+ "/tmp/tmpuzz1ow:1: (unicode error) 'unicodeescape' codec can't decode bytes in position 0-2: truncated \\xXX escape\nfoo = '\\xyz'\n ^\n")
? ^

----------------------------------------------------------------------
Ran 221 tests in 0.314s

FAILED (failures=1, skipped=8)

When run as:
python3.3 -m unittest discover

summary: - test suite failure
+ py3flakes test suite failure
Revision history for this message
Florent (florent.x) wrote :

Thanks for the report.

It's weird that this failure was not seen on the Travis builder https://travis-ci.org/pyflakes/pyflakes/builds/4454384
The difference is that it uses the unittest2/unittest2py3k packages to use the same features for older versions of Python.

I just did the "python -m unittest discover" in a checkout of the repository, with Python 3.3, and no failure.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Ok, I may have not given the full-details here then.
As I also have a patch applied to use python3.3's unittest instead of unittest2py3k, on ubuntu python3.3 is the default now and 3.3 or better will be the default in jessie. Hence I see no reason why unittest2py3k is needed in ubuntu/debian distributions. (I understand why it's useful from upstream point of view to use unittest2py3k as one gets all pythons support across the board).

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

I will experiment further to see, if the test failure was self induced.

Florent (florent.x)
Changed in pyflakes:
status: New → Incomplete
Revision history for this message
Florent (florent.x) wrote :

worksForMe.

Please re-open if you have more details.

Changed in pyflakes:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.