Skip to content

Commit

Permalink
Fix 2.x output
Browse files Browse the repository at this point in the history
  • Loading branch information
tony committed May 5, 2019
1 parent 0875d02 commit 1227f6a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/test_unihan.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

import pytest

from unihan_etl import constants, process, __version__
from unihan_etl import __version__, constants, process
from unihan_etl._compat import PY2
from unihan_etl.process import DEFAULT_OPTIONS, UNIHAN_ZIP_PATH, Packager, zip_has_files
from unihan_etl.test import assert_dict_contains_subset
from unihan_etl.util import merge_dict
Expand Down Expand Up @@ -346,4 +347,8 @@ def test_cli_version(capsys, flag):
with pytest.raises(SystemExit):
Packager.from_cli([flag])
captured = capsys.readouterr()
assert __version__ in captured.out

if PY2: # todo: why does python 2.x return -v in error?
assert __version__ in captured.err
else:
assert __version__ in captured.out

0 comments on commit 1227f6a

Please sign in to comment.