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
wordofglass
ac2f7fe712
Fix the fanarttv source failing when there were images found, but no cover art
2016-04-20 12:59:18 +02:00
wordofglass
6cbbba7dae
initial work on allowing slightly non-square images in fetchart
2016-04-18 01:47:39 +02:00
wordofglass
8169983074
fix translation of the old remote_priority option for fetchart, add a test
2016-04-17 21:18:31 +02:00
wordofglass
9ce10c2fda
Merge branch 'master' into fetchart_unify_sources,
...
i.e. adapt the fanart.tv source
2016-04-16 13:34:46 +02:00
wordofglass
7bec3b9de5
fanart.tv tests, mostly copied and pasted from the google tests
2016-04-15 14:56:14 +02:00
wordofglass
98d5aa4a13
fetchart: remove unused import
2016-04-14 16:56:45 +02:00
wordofglass
7322e212a4
fetchart: adapt test to earlier config read
2016-04-14 16:49:06 +02:00
wordofglass
de3e91db87
fetchart: fix tests providing album=None
2016-04-14 15:25:10 +02:00
wordofglass
1cc4d11baf
Fetchart: fix tests and fetachart logic
2016-04-13 22:56:18 +02:00
wordofglass
a4994d2bf8
fetchart: fix more tests
2016-04-06 01:36:32 +02:00
wordofglass
bc877a6d7f
fetchart: fix tests (mostly pep8, syntax)
2016-04-06 01:19:44 +02:00
wordofglass
bbc06e9de9
fetchart: Adapt ArtForAlbumTest
2016-04-05 23:24:30 +02:00
wordofglass
206a88caff
fetchart: Adapt ArtImporterTest
2016-04-05 22:43:17 +02:00
wordofglass
4b4a0e8bd3
fetchart: Adapt AAOTest, GoogleImageTest
2016-04-05 21:52:30 +02:00
wordofglass
02892a41aa
fetchart: Adapt CombinedTest
2016-04-05 21:34:58 +02:00
wordofglass
31aff68150
fetchart: Adapt FetchImageTest, FSArtTest
2016-03-25 16:25:00 +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
68dbbba6a0
Removed import of unicode_literals from tests
...
* test_art
* test_autotag
2016-02-20 14:57:56 +01:00
Jesse Weinstein
72ce9ea3eb
use underscore in name for pep-8s sake
2016-01-12 22:14:12 -08:00
Jesse Weinstein
d93f723263
Convert SKIP_SLOW_TESTS to its own decorator
2016-01-12 21:53:52 -08:00
Jesse Weinstein
760298b8e4
Mark slow tests to be skipped if SKIP_SLOW_TESTS env var is defined
...
Saves over 100 seconds.
2016-01-10 23:18:47 -08:00
Jesse Weinstein
dda1173e02
Escape quotes to make old version of emacs font-lock happy
2016-01-10 22:01:13 -08:00
Jack Wilsdon
12cd5306b7
Update copyright dates to 2016
2015-12-30 15:42:06 +00:00
Lachlan Charlick
f7b05729a3
fetchart: Add tests for google backend
2015-12-29 01:49:07 +10:30
Lachlan Charlick
2e10b8c284
fetchart: Pass config object to backends when initialized
2015-12-29 01:37:53 +10:30
Adrian Sampson
b31f8cd802
Remove tests for Google fetchart backend ( #1760 )
2015-12-12 16:58:49 -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
reiv
1625dfc17e
Merge branch 'master' into 1264-unnecessary-resize
2015-11-03 02:46:33 +01:00
reiv
93009911e0
fetchart: Add test for image resizing
...
This test ensures that images are resized if and only if they are
wider than the maxwidth setting.
2015-11-03 02:17:21 +01:00
reiv
d0cfb3e990
fetchart: add test for re-fetching deleted art
...
This test addresses #1126 .
2015-11-02 02:20:09 +01:00
Adrian Sampson
adebb850b5
Tests: fix a leaky error message
...
Caused by inadvertently executing too much at module-import time. By
materializing ArtResizer in a global definition, we triggered a debug log
before the test harness had a chance to capture the logging.
2015-05-19 16:50:05 -07:00
Tom Jaspers
a82dee35cb
fetchart complains if no imaging backend available
...
The `enforce_ratio` and `minwidth` options depend on PIL or ImageMagick.
Previously it silently fails. Now it will log a warning, and accept the
image.
Tests concerning these options are skipped when no imaging backend is available.
Fix #1460
2015-05-18 19:44:40 +02:00
Adrian Sampson
d6348a4da2
tests: Use bytes for mock responses
...
Also, require a newer version of responses that is less sensitive to this.
2015-05-13 18:09:35 -07:00
Frederik “Freso” S. Olesen
0d21e816d4
Fetchart: Remove hard 500px size limit for CAA cover art.
...
Using -500 URLs for coverartarchive.org will only ever return images
where the biggest dimension is (width or height) is 500 pixels,
regardless of what fetchart settings are otherwise set.
This commit removes the -500 from the URL entirely rather than using it
conditionally, since a maxwidth of 500 will allow for a 600 high and 500
wide image, but CAA.org/...-500 would return a 500x417 image instead, so
not enforcing a size is the only way to ensure the user's {max,min}width
settings are properly respected.
2015-04-07 15:24:01 +02:00
Tom Jaspers
2c6f29bfb6
Add tests for minwidth and enforce_ratio
2015-04-06 11:12:16 +02: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
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
1f62711221
Fix FetchArt tests
2015-01-06 21:42:10 +01:00
Fabrice Laporte
1b0933daa9
fetchart: fix tests to handle generators
2014-11-10 22:37:19 +01:00
Fabrice Laporte
ef6d3efe6d
fetchart: cover engines yield their results
2014-11-10 22:17:34 +01:00
Fabrice Laporte
6170c3a179
fetchart: make test_art.py tests pass
2014-11-09 20:41:21 +01:00
Thomas Scholtes
98ae8cbbc9
Make tests conform to PEP8
2014-09-09 22:31:46 +02:00
Fabrice Laporte
ef89daf1be
test_art: add unit test
...
the test checks that the keyword priority (related to its
position in the keywords list) is considered when selecting
image filename amongst several candidates
2014-06-27 23:32:57 +02:00
Adrian Sampson
dfa8445980
Style and wording for Google Images ( #766 )
2014-05-17 22:10:39 -07:00