Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autopep8 0.6.4: test/bad_encoding.py and test/bad_encoding2.py missing in PyPI tarball #25

Closed
Arfrever opened this issue Jun 9, 2012 · 3 comments

Comments

@Arfrever
Copy link

Arfrever commented Jun 9, 2012

test/bad_encoding.py and test/bad_encoding2.py are missing in PyPI tarball, which results in errors in test_read_from_filename_with_bad_encoding() and test_read_from_filename_with_bad_encoding2().

$ PYTHONPATH="." python2.7 test/test_autopep8.py
.................................................................................................................................EE.
======================================================================
ERROR: test_read_from_filename_with_bad_encoding (__main__.TestUtils)
Bad encoding should not cause an exception.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_autopep8.py", line 79, in test_read_from_filename_with_bad_encoding
    os.path.join(ROOT_DIR, 'test', 'bad_encoding.py')))
  File "/tmp/autopep8-0.6.4/autopep8.py", line 81, in read_from_filename
    encoding=detect_encoding(filename)) as input_file:
  File "/tmp/autopep8-0.6.4/autopep8.py", line 59, in detect_encoding
    with open(filename, 'rb') as input_file:
IOError: [Errno 2] No such file or directory: '/tmp/autopep8-0.6.4/test/bad_encoding.py'

======================================================================
ERROR: test_read_from_filename_with_bad_encoding2 (__main__.TestUtils)
Bad encoding should not cause an exception.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_autopep8.py", line 84, in test_read_from_filename_with_bad_encoding2
    os.path.join(ROOT_DIR, 'test', 'bad_encoding2.py')))
  File "/tmp/autopep8-0.6.4/autopep8.py", line 81, in read_from_filename
    encoding=detect_encoding(filename)) as input_file:
  File "/tmp/autopep8-0.6.4/autopep8.py", line 59, in detect_encoding
    with open(filename, 'rb') as input_file:
IOError: [Errno 2] No such file or directory: '/tmp/autopep8-0.6.4/test/bad_encoding2.py'

----------------------------------------------------------------------
Ran 132 tests in 3.852s

FAILED (errors=2)
@myint
Copy link
Collaborator

myint commented Jun 10, 2012

Fixed in commit 99c5855.

@jayrod
Copy link

jayrod commented Oct 26, 2015

I'm still seeing this error. I've pulled from the latest zip file and does not seem to be working. Thoughts?

@myint
Copy link
Collaborator

myint commented Oct 27, 2015

@jayrod, it seems to work for me. Could you provide the relevant commands you used and the traceback you are getting?

$ wget https://pypi.python.org/packages/source/a/autopep8/autopep8-1.2.1.tar.gz#md5=4167555f521ddd69b66f13819604f3db
$ tar xf autopep8-1.2.1.tar.gz
$ cd autopep8-1.2.1/
$ python test/test_autopep8.py
Ran 457 tests in 16.968s

OK (skipped=2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants