diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2016-11-23 06:43:32 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2016-11-23 06:43:32 -0500 |
commit | 6d52ca769982b0dcc0b2eda82c9a1204dadbca4c (patch) | |
tree | 42bee7a7cd189fbc12e293eb511c6b9ca66bd6c4 /tests/helpers.py | |
parent | d096eb49df4fb1f0395117a41658f733e85760f7 (diff) | |
download | python-coveragepy-git-6d52ca769982b0dcc0b2eda82c9a1204dadbca4c.tar.gz |
Use a 2/3 name for unicode
Diffstat (limited to 'tests/helpers.py')
-rw-r--r-- | tests/helpers.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/helpers.py b/tests/helpers.py index f4bff2b0..ebc15cd1 100644 --- a/tests/helpers.py +++ b/tests/helpers.py @@ -8,6 +8,7 @@ import subprocess import sys from coverage import env +from coverage.backward import unicode_class from coverage.misc import output_encoding @@ -17,7 +18,7 @@ def run_command(cmd): Returns the exit status code and the combined stdout and stderr. """ - if env.PY2 and isinstance(cmd, unicode): + if env.PY2 and isinstance(cmd, unicode_class): cmd = cmd.encode(sys.getfilesystemencoding()) # In some strange cases (PyPy3 in a virtualenv!?) the stdout encoding of |