Skip to content

Commit

Permalink
Fix doctest on py3
Browse files Browse the repository at this point in the history
  • Loading branch information
wolever committed Jan 9, 2015
1 parent 12e177d commit 8239213
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 4 additions & 4 deletions libpip2pi/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ def file_to_package(file, basedir=None):
('Cython', '0.17.2-cp26-none-linux_x86_64.whl')
>>> file_to_package("foo.whl")
Traceback (most recent call last):
...
InvalidFilePackageName: ...
...
InvalidFilePackageName: unexpected file name: 'foo.whl' (not in 'pkg-name-version.xxx' format)
>>> file_to_package("foo.png")
Traceback (most recent call last):
...
InvalidFilePackageName: ...
...
InvalidFilePackageName: unexpected file name: 'foo.png' (not in 'pkg-name-version.xxx' format)
"""
file = os.path.basename(file)
file_ext = os.path.splitext(file)[1].lower()
Expand Down
5 changes: 4 additions & 1 deletion tests/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,10 @@ def test_wheels(self):


def load_tests(loader, tests, ignore):
tests.addTests(doctest.DocTestSuite(pip2pi_commands, optionflags=doctest.ELLIPSIS))
tests.addTests(doctest.DocTestSuite(
pip2pi_commands,
optionflags=doctest.ELLIPSIS|doctest.IGNORE_EXCEPTION_DETAIL
))
return tests


Expand Down

0 comments on commit 8239213

Please sign in to comment.