Drop support for legacy Python 2

This commit is contained in:
Hugo 2018-08-14 16:26:15 +03:00 committed by hugovk
parent 5fded8398b
commit 07fac0628c
10 changed files with 90 additions and 80 deletions

View file

@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
import mock
import pytest
import six
import pylast
@ -13,9 +12,9 @@ def mock_network():
@pytest.mark.parametrize(
"artist",
[
u"\xe9lafdasfdsafdsa",
u"ééééééé",
pylast.Artist(u"B\xe9l", mock_network()),
"\xe9lafdasfdsafdsa",
"ééééééé",
pylast.Artist("B\xe9l", mock_network()),
"fdasfdsafsaf not unicode",
],
)
@ -24,7 +23,7 @@ def test_get_cache_key(artist):
request._get_cache_key()
@pytest.mark.parametrize("obj", [pylast.Artist(u"B\xe9l", mock_network())])
@pytest.mark.parametrize("obj", [pylast.Artist("B\xe9l", mock_network())])
def test_cast_and_hash(obj):
assert type(six.text_type(obj)) is six.text_type
assert type(str(obj)) is str
assert isinstance(hash(obj), int)