diff options
| -rw-r--r-- | pathod/utils.py | 3 | ||||
| -rw-r--r-- | test/pathod/test_utils.py | 1 | 
2 files changed, 3 insertions, 1 deletions
| diff --git a/pathod/utils.py b/pathod/utils.py index 2f9de83d..b14535ca 100644 --- a/pathod/utils.py +++ b/pathod/utils.py @@ -60,7 +60,8 @@ def inner_repr(s):          Returns the inner portion of a string or unicode repr (i.e. without the          quotes)      """ -    if six.PY2 and isinstance(s, unicode): +    if (six.PY2 and isinstance(s, unicode)) or \ +            (six.PY3 and isinstance(s, bytes)):          return repr(s)[2:-1]      else:          return repr(s)[1:-1] diff --git a/test/pathod/test_utils.py b/test/pathod/test_utils.py index 4dcedf6e..4e891ad9 100644 --- a/test/pathod/test_utils.py +++ b/test/pathod/test_utils.py @@ -30,6 +30,7 @@ def test_data_path():  def test_inner_repr():      assert utils.inner_repr("\x66") == "\x66"      assert utils.inner_repr(u"foo") == "foo" +    assert utils.inner_repr(b"foo") == "foo"  def test_escape_unprintables(): | 
