diff --git a/lyricsgenius/api/base.py b/lyricsgenius/api/base.py index 31d73122..e6e6d3d1 100644 --- a/lyricsgenius/api/base.py +++ b/lyricsgenius/api/base.py @@ -81,11 +81,11 @@ def _make_request( except Timeout as e: error = "Request timed out:\n{e}".format(e=e) if tries > self.retries: - raise Timeout(error) + raise Timeout(error) from e except HTTPError as e: error = get_description(e) if response.status_code < 500 or tries > self.retries: - raise HTTPError(response.status_code, error) + raise HTTPError(response.status_code, error) from e # Enforce rate limiting time.sleep(self.sleep_time) diff --git a/tests/test_genius.py b/tests/test_genius.py index ce73396d..87d31a03 100644 --- a/tests/test_genius.py +++ b/tests/test_genius.py @@ -85,8 +85,8 @@ def setUpClass(cls): cls.lyrics_ending = ( "[Outro]" "\nNow I’m kicking leaves" - "\nCursing the one that I love and the one I don’t" - "\nI wonder who you’re thinking of" + "\nCursing the one that I love and the one I don't" + "\nI wonder who you're thinking of" ) def test_lyrics_with_url(self): diff --git a/tests/test_song.py b/tests/test_song.py index 13845ede..3807a4e8 100644 --- a/tests/test_song.py +++ b/tests/test_song.py @@ -34,7 +34,7 @@ def test_artist(self): self.assertEqual(self.song.artist, self.artist_name) def test_lyrics_raw(self): - lyrics = '[Verse 1: Andy Shauf]' + lyrics = '[Verse 1]' self.assertTrue(self.song.lyrics.startswith(lyrics)) def test_lyrics_no_section_headers(self):