Commit graph

89 commits

Author SHA1 Message Date
Bruno Cauet
53c21330c2 All tests use unicode_literals 2015-01-20 15:58:02 +01:00
Bruno Cauet
9c41c39913 Do __name__ comparison with bytes and not unicode 2015-01-20 12:03:57 +01:00
Bruno Cauet
90b388b775 Use __future__ imports but unicode_literals everywhere
Include import of __future__ features division, absolute_imports and
print_function everywhere. Don't add unicode_literals yet for it is
harder to convert.

Goal is smoothing the transition to python 3.
2015-01-19 12:25:16 +01:00
Bruno Cauet
2902cda036 tests: use absolute imports everywhere 2015-01-19 12:25:15 +01:00
Bruno Cauet
b49cd3b73b Lyrics plugin: fix google backend
Give config on backends init so the Google backend can get the API key
and Engine Id.
Fix #1226
2015-01-15 11:28:04 +01:00
Bruno Cauet
b27c5304d1 Merge branch 'master' into logging
Conflicts:
	beetsplug/fetchart.py
	beetsplug/mpdstats.py
2015-01-09 15:15:27 +01:00
Frederik “Freso” S. Olesen
4b1f0cbf48 Happy 2015. ;)
See 7a410f636b

Command used:

    git grep -l 'Copyright 201'|xargs sed -i -E 's/Copyright 201./Copyright 2015/'`
2015-01-08 21:37:09 +01:00
Bruno Cauet
974155f2bc Fix pep8 in test 2015-01-06 22:10:30 +01:00
Bruno Cauet
30562024d2 Fix Lyrics plugin tests 2015-01-06 21:42:10 +01:00
Fabrice Laporte
38b890cdd6 lyrics: add test checking scraping of mocked page 2014-12-31 06:16:06 +01:00
Fabrice Laporte
d4d5c085fa lyrics : remove empty divs before scraping
it may result in \n being inserted that we will strip in
_scrape_strip_cruft
2014-12-30 23:37:23 +01:00
Fabrice Laporte
c12dd5163d add lyrics.com and lyrics.wikia.com to google srcs 2014-12-19 00:00:10 +01:00
Fabrice Laporte
01f484712e change lyrics.com song 2014-12-18 23:59:37 +01:00
Fabrice Laporte
a41106652e fix lyrics.net song url 2014-12-18 23:58:58 +01:00
Fabrice Laporte
7d0744d46b lyrics: update unit tests 2014-12-17 22:04:54 +01:00
Fabrice Laporte
0f2f43ca9b lyrics: add musixmatch source 2014-12-17 00:41:21 +01:00
Fabrice Laporte
5434c028a4 lyrics: add sources to google CSE 2014-12-13 11:15:55 +01:00
Fabrice Laporte
a0579d66cf lyrics: remove full texts from lyricstext.yaml
lyrics are considered valid if they contain a set of
selected keywords picked along the original full text.
2014-11-11 09:06:37 +01:00
Fabrice Laporte
84c82cc44b Move script to download pages out of tests_lyrics.py
By default (as runned by CI tools), only *fake* example.com page is present in
rsr/lyrics and tests that check content of pages coming from *real* sources are
thus skipped.
Execute lyrics_download_samples.py to download pages from *real* sources. When
done and *real* pages are present on disk, no tests are skipped.
2014-11-08 10:55:48 +01:00
Fabrice Laporte
f5e7bd5d05 Move script to download pages out of tests_lyrics.py
By default (as runned by CI tools), only *fake* example.com page is present in
rsr/lyrics and tests that check content of pages coming from *real* sources are
thus skipped.
Execute lyrics_download_samples.py to download pages from *real* sources. When
done and *real* pages are present on disk, no tests are skipped.
2014-11-08 10:48:28 +01:00
Fabrice Laporte
356c1f44b5 nosetests: don't run slow tests by default 2014-11-06 22:46:42 +01:00
Fabrice Laporte
b143ad7e3e fix #1035 do scraping tests on mock data
don’t store scraped pages with licensed lyrics in repo
2014-11-06 22:10:15 +01:00
Adrian Sampson
9137b5c2f3 Fix another lyrics scraper regression (#1034)
Along with a test.
2014-10-24 20:08:32 -07:00
Adrian Sampson
0325fe2225 lyrics: Remove script tags (fix #1034) 2014-10-24 17:33:11 -07:00
Fabrice Laporte
4386d9d4df skip test involving bs4 if python version too low 2014-10-09 08:23:20 +02:00
Fabrice Laporte
546d17f52f fix flake8 2014-10-08 20:55:00 +02:00
Fabrice Laporte
4600727e17 fix building of lyrics file paths 2014-10-08 20:32:30 +02:00
Fabrice Laporte
edbbadaf4f add test to check lyrics title match in url title 2014-10-08 14:49:59 +02:00
Fabrice Laporte
3a748f3294 add test_is_page_candidate() 2014-09-25 00:05:29 +02:00
Fabrice Laporte
a6a83be434 fix flake8 2014-09-24 23:30:38 +02:00
Fabrice Laporte
879fc8d3ca add LyricsGooglePluginTest to test_lyrics.py 2014-09-24 18:04:37 +02:00
Fabrice Laporte
8ef7837d22 merge strip_cruft() and _scrape_normalize_eol() into _scrape_strip_cruft 2014-09-24 16:51:54 +02:00
Fabrice Laporte
168a24ad77 test_lyrics.py: improve lyrics module coverage 2014-09-22 17:28:02 +02:00
Thomas Scholtes
98ae8cbbc9 Make tests conform to PEP8 2014-09-09 22:31:46 +02:00
Thomas Scholtes
b512a0ce37 lyrics: Use multiple lyrics search strings.
In particular we use the original artist and title before stripping
*and* and *featuring* suffixes.

Fixes #914.
2014-08-24 16:17:21 +02:00
Fabrice Laporte
117d16f2ad lyrics: add tests to track which websites can be scraped by our algo and be
used as sources fot the google custom search engine.
2014-04-26 07:26:50 +02:00
Adrian Sampson
e5d28e2171 lyrics is flake8-clean 2014-04-12 13:32:46 -07:00
Adrian Sampson
7fcd7daf7c lyrics: minor style/doc cleanup 2014-04-12 13:08:24 -07:00
Fabrice Laporte
9a32ed5864 add lyrics plugin unit tests file 2014-04-12 12:30:15 +02:00