File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,7 +35,6 @@ def _encode(string: str | bytes) -> bytes:
3535
3636def _decode (byte_string : bytes | str ) -> str :
3737 """Decode byte string to (unicode) string"""
38- # this test for bytes works on Python 2 and 3
3938 if isinstance (byte_string , bytes ):
4039 return byte_string .decode ()
4140 elif isinstance (byte_string , str ):
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ class DiscTestData:
7373
7474class TestModulePrivate (unittest .TestCase ):
7575 # lots of encoding tests
76- # not part of the actual API, but this is quite different in Python 2/3
76+ # not part of the actual API, but used internally to handle both bytes and str
7777 def test_encode (self ):
7878 self .assertTrue (type (discid .util ._encode ("test" )) is bytes )
7979 self .assertEqual (discid .util ._encode ("test" ), b"test" )
You can’t perform that action at this time.
0 commit comments