Deprecate is_streamable and is_fulltrack_available

This commit is contained in:
Hugo van Kemenade 2022-01-24 19:04:38 +02:00
parent e14f51a32a
commit 3b7cb9c8c7
3 changed files with 41 additions and 18 deletions

View file

@ -229,7 +229,8 @@ class TestPyLastArtist(TestPyLastWithLastFm):
mbid = artist1.get_mbid()
playcount = artist1.get_playcount()
streamable = artist1.is_streamable()
with pytest.warns(DeprecationWarning):
streamable = artist1.is_streamable()
name = artist1.get_name(properly_capitalized=False)
name_cap = artist1.get_name(properly_capitalized=True)

View file

@ -123,7 +123,8 @@ class TestPyLastTrack(TestPyLastWithLastFm):
track = pylast.Track("Nirvana", "Lithium", self.network)
# Act
streamable = track.is_streamable()
with pytest.warns(DeprecationWarning):
streamable = track.is_streamable()
# Assert
assert not streamable
@ -133,7 +134,8 @@ class TestPyLastTrack(TestPyLastWithLastFm):
track = pylast.Track("Nirvana", "Lithium", self.network)
# Act
fulltrack_available = track.is_fulltrack_available()
with pytest.warns(DeprecationWarning):
fulltrack_available = track.is_fulltrack_available()
# Assert
assert not fulltrack_available