Commit Graph
67 Commits
Author SHA1 Message Date
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
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