Commit graph

89 commits

Author SHA1 Message Date
Andrew Rogl
9106b41a50 Remove as many as possible sys.version tests 2021-08-27 10:24:27 +10:00
Andrew Rogl
ee4268dabb Remove unused imports
Fix imports
Fix formatting
2021-08-26 20:59:48 +10:00
Andrew Rogl
1ec87a3bdd pyupgrade beetsplug and tests
All tests working
More tidy up to be done
2021-08-26 19:12:51 +10:00
Xavier Hocquet
8c6530369d
Merge branch 'master' into tekstowo-lyrics 2021-03-28 12:05:42 -06:00
Adrian Sampson
e99becb41e Use Unicode in lyrics tests 2020-10-18 07:32:44 -04:00
Adrian Sampson
ce80459110
Merge pull request #3767 from jackwilsdon/skip-azlyrics
Skip AZLyrics on GitHub actions
2020-10-05 20:48:49 -04:00
Jack Wilsdon
7138408491
Skip AZLyrics on GitHub actions 2020-10-06 00:05:48 +01:00
Jack Wilsdon
d115f3679b
Remove LyricWiki source
LyricWiki was shut down on 2020/09/21 and no longer serves lyrics.
2020-10-05 22:15:40 +01:00
Jack Wilsdon
92f425628d
Skip Genius integration test on GitHub actions 2020-08-02 17:56:22 +01:00
jtpavlock
aedd77317f
Merge pull request #3658 from jtpavlock/integration_tests
Add weekly integration test github action
2020-07-06 11:37:46 -05:00
jtpavlock
45abc9ed7a
Clean up code and tests for Genius Lyrics plugin backend (#3641)
* clean-up code & add tests for genius lyrics backend

* add genius fetch tests

* organize imports: standard lib -> pip -> local

* check in sample genius lyrics page

* fix mock import

* force utf-8 encoding for opened files

* use io.open to force utf-8 encoding w/ python2.7
2020-07-06 08:41:27 -05:00
Jacob Pavlock
06553cc37c adjust test_lyrics.py to work with integration tests 2020-07-05 21:41:31 -07:00
Jacob Pavlock
17d9477106 tests for applicable genius artist slugging 2020-06-26 19:33:08 -07:00
stlutz
5d306d6fd9 Remove debugging statement and conform to line length. 2020-05-16 17:48:56 +02:00
stlutz
46143d9762 Remove unnecessary intermediate web request to genius.com when fetching lyrics.
The search results already include the correct song page url, making it superfluous to do another request via the /song api just to get it.
2020-05-16 16:28:17 +02:00
Ashhar Hasan
625e9253c0
Add tests for artist_sort as lyrics search fallback
Adjust doc comment to highlight that artist_sort is used as a fallback
2020-04-19 19:19:07 +05:30
lijacky
9ec0d725e5 Changes given feedback on https://github.com/beetbox/beets/pull/3554 and trimmed sample html 2020-04-17 17:14:21 -04:00
lijacky
b7ecf32f28 style changes 2020-04-16 19:06:17 -04:00
lijacky
29d7b80847 Added unit test for null check 2020-04-16 19:06:17 -04:00
Xavier Hocquet
1266a04998 Docs, lint, and cleanup beautifulsoup source check 2020-03-19 21:10:52 -06:00
Carl Suster
d2f13bf65c confit: replace with confuse in tests 2019-06-01 10:13:13 +10:00
Adrian Sampson
0a74e0fd3f Style fixes for latest pycodestyle changes 2018-10-24 17:05:38 -04:00
Antoine Beaupré
914dba4152
add tests for slug function, failing 2017-07-18 16:32:47 -04:00
Fabrice Laporte
409f070970 Remove lyrics.com source 2017-05-03 22:54:09 +02:00
Fabrice Laporte
8f32bfed82 Reactivate test of LyricsCom and MusiXmatch sources 2017-05-03 07:42:50 +02:00
Fabrice Laporte
f53ab801b8 Add indent 2017-05-03 00:11:26 +02:00
Fabrice Laporte
b3fbdbae5a Fix flake8 2017-05-03 00:02:09 +02:00
Fabrice Laporte
3e38a33c4a Fix PEP8 2017-05-02 23:37:20 +02:00
Fabrice Laporte
11eb90c758 Fix PEP8 2017-05-02 07:46:51 +02:00
Fabrice Laporte
3e3ad6974c Fix PEP8 2017-05-02 07:30:40 +02:00
Fabrice Laporte
fa9262d61b Disable tests that do real requests to lyrics sites by default.
Set BEETS_TEST_LYRICS_SOURCES environment variable to '1' to not skip the
tests.
2017-05-02 01:05:18 +02:00
Fabrice Laporte
d88cabc846 Divide LyricsGooglePluginTest into two classes.
Move existing tests into LyricsGooglePluginMachineryTest.
Create LyricsPluginSourcesTest class to check fetching of each source.
Some code was supposed to do that until now but was never executed as we
exited early at the "if not check_lyrics_fetched():" check.
2017-05-02 01:03:26 +02:00
Fabrice Laporte
a85dcd88c4 Store whole expected lyrics, not just keywords, but randomized 2017-05-02 00:56:56 +02:00
Fabrice Laporte
4e0527f07d Docstrings style 2017-05-02 00:54:58 +02:00
Fabrice Laporte
f8862ac0ea Sort imports 2017-05-02 00:52:07 +02:00
Adrian Sampson
a88682e7bb Undo from _common import unittest indirection
This was a vestige from when we used to need the unittest2 library for pre-2.7
compatibility. Now that we require Python 2.7, we aren't using that library
and this indirection wasn't doing any good.
2016-11-26 18:46:44 -05:00
Fabrice Laporte
e2703b9a7c always yield item artist and title first
Rather than using an unordered set for storing pairs, append to a list
and build an OrderedDict from it to filter duplicated strings while
keeping order.
2016-09-25 15:46:22 +02:00
Fabrice Laporte
059be3b94c test_lyrics: fix too many blank lines 2016-09-23 22:41:44 +02:00
Fabrice Laporte
8b4f39da42 lyrics: search for song title part preceding colon. fix #2205 2016-09-23 22:23:32 +02:00
Johnny Robeson
e8afcbe7ec replace unicode with six.text_type 2016-06-24 05:53:49 -04:00
Johnny Robeson
36b3b20422 bytestringify test_lyrics 2016-06-16 21:34:52 -04:00
Adrian Sampson
71b9fd785c Revert "Do __name__ comparison with bytes and not unicode"
This reverts commit 9c41c39913.
That commit used byte strings for the `if __name__ == '__main__'` pattern,
which was necessary when we were doing unicode_literals. But it is wrong on
Python 3, and now that we're liberated from unicode_literals, we need to go
back to native strings for this comparison.
2016-05-29 19:19:59 -07:00
Jack Wilsdon
b1c58e99ec Update code to match pep8 naming standards 2016-04-27 20:15:10 +01:00
Adrian Sampson
e54c7eec3d Standardize __future__ imports without parentheses
Since the list is short enough now, we don't need parentheses for the line
wrap. This is a little less ugly.
2016-02-28 15:03:51 -08:00
Peter Kessen
ad321079f9 Fixed test in test_lyrics 2016-02-22 09:07:12 +01:00
Peter Kessen
9507bfb1e4 Removed unicode_literals from test_lyrics 2016-02-22 07:42:31 +01:00
Adrian Sampson
c7045daf90 sampsyo -> beetbox (#1730) 🎉 2016-01-08 20:36:16 -08:00
Jack Wilsdon
12cd5306b7 Update copyright dates to 2016 2015-12-30 15:42:06 +00:00
Adrian Sampson
5a285cc11f Fix #1673: Escape regex terms in lyrics 2015-12-12 18:09:24 -08:00
Peter Kessen
3eb8008b11 added encoding as comment in files
added line like
# -*- coding: utf-8 -*-
to all files with correct license in header
2015-11-19 18:41:01 +01:00