Aaron
f6df3befac
Added interactive test method for embedart plugin.
2017-03-08 19:06:09 -08:00
Adrian Sampson
5a71ce722a
Simplify embedart test changes for #2422
...
Whenever possible, it's nice to avoid using DummyIO---it can make debugging
difficult.
2017-03-06 23:55:14 -05:00
Aaron
d1ac893915
Style changes to pass PEP8 tests.
2017-02-13 01:58:31 -08:00
Aaron
9c97f95073
Updated embedart test cases to accomodate confirmation prompt.
2017-02-13 01:58:31 -08: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
nathdwek@laptop
e782885e50
embedart: Adapt tests for #2254
2016-11-08 18:48:44 +01:00
Johnny Robeson
8c1e9e0dd4
add missing displayable_paths to satisify python -bb
2016-07-03 23:52:05 -04:00
Johnny Robeson
be942c4595
complete more bytestrings in test_embedart
2016-06-15 00:10:01 -04:00
Johnny Robeson
ffa46a185c
bytestring normalization
...
Make sure many/most strings that touch the filesystem are
converted explicitly to bytestrings rather than implictly.
2016-06-13 05:39:09 -04:00
Adrian Sampson
e346c28886
ImageMagick check uses convert, not identify
...
See #670 for details. This reverts a change from
a0c38a07a6 . This caused problems on
Windows, but the fundamental problem is more general.
2016-06-10 15:29:13 -07:00
Johnny Robeson
4e4a919895
write to tempfile in binary in embedart test
2016-06-10 04:52:55 -04:00
Adrian Sampson
e508daea63
Use syspath for existence checks
2016-06-09 09:43:24 -07:00
Adrian Sampson
1c1c73b062
Check for convert failures
2016-06-06 11:01:10 -07:00
Adrian Sampson
ad74da1149
Refactor similarity tests
...
The upshot is we can now compare the two Popen invocations
independently.
2016-06-06 10:58:25 -07:00
Adrian Sampson
bfa56b1d8d
Tests: fix mocking of art.extract
2016-06-06 10:08:30 -07:00
Adrian Sampson
5db8f69bc1
Fix invocation signature for check_art_similarity
...
The second argument is an Item, not a filename.
2016-06-05 12:37:05 -07:00
Adrian Sampson
60b4172a59
Tests: don't use None as a path stand-in
...
This triggered a crash in `syspath` on Windows.
2016-06-05 12:26:51 -07:00
Adrian Sampson
2228e0e8e1
More binary-mode open in tests
2016-06-02 11:52:56 -07: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
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
4d1a02a552
Removed unicode_literals from test_embedart
2016-02-22 09:20:54 +01:00
Jack Wilsdon
12cd5306b7
Update copyright dates to 2016
2015-12-30 15:42:06 +00: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
Jack Wilsdon
b1cef2606b
Delete the artwork file if the test failed
2015-09-10 22:48:47 +01:00
Jack Wilsdon
2f333968c5
Add test for removing art files (remove_art_file property) ( #1591 )
2015-09-10 22:18:13 +01:00
Adrian Sampson
36c2241a34
Use bytestring filenames in embedart tests
...
First step on #1461 .
2015-05-19 16:09:39 -07:00
Adrian Sampson
dff4feaec2
embedart: Preempt wrong-type error in AAC files
2015-05-11 17:46:21 -07:00
Adrian Sampson
61ffc165df
Tests: avoid leaking a mock
...
The decorator is now necessary because we're patching a module-global.
2015-04-05 12:28:14 -07:00
Adrian Sampson
0af2cdaa3a
New beets.art image utilities
...
This makes it cleaner to share the high-level image-embedding logic between
the `embedart` and `convert` plugins. This resolves a regression, introduced
in f504c786 , that inadvertently activated the former plugin when the latter
was enabled. I also like avoiding cross-plugin imports.
2015-04-05 12:15:38 -07:00
Bruno Cauet
88baf1979e
Revert "Sometimes the extract art test failed because the file type of the extracted image might be PNG or JPG. Belongs to #1328."
...
This reverts commit c91e8cb782 .
2015-02-20 12:56:43 +01:00
mried
c91e8cb782
Sometimes the extract art test failed because the file type of the extracted image might be PNG or JPG. Belongs to #1328 .
2015-02-19 19:43:07 +01:00
Malte Ried
b3fc489305
Fixed the flake8 check...
2015-02-15 19:50:11 +01:00
Malte Ried
eafdd9e379
Extraction of cover art of albums with non ascii characters lead to a crash.
2015-02-15 19:39:39 +01:00
Adrian Sampson
b8dab9cf9f
Merge pull request #1247 from brunal/future
...
Use all __future__ imports in beets core
Conflicts:
beetsplug/web/__init__.py
test/test_embedart.py
2015-01-26 17:02:07 -08:00
Adrian Sampson
070d4feb62
Remove unused import
2015-01-21 10:10:47 -08:00
Adrian Sampson
6b11c6326e
embedart: Fix test for 433d6b7 ( #1252 )
2015-01-21 09:35:36 -08: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
b436e75a9e
embedart: fix behaviour on IM unparseable output, add tests
...
Test all EmbedCoverArtPlugin.check_art_similarity() code paths.
Improve #1241 .
2015-01-19 11:50:51 +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
df82e113e5
Fix embedart tests
2015-01-06 21:42:34 +01:00
Adrian Sampson
ddf5511624
Use unittest.SkipTest instead of nose's version
...
I don't *think* this should actually do anything, but it does remove a
dependence on nose.
2014-11-05 10:49:45 -08:00
Fabrice Laporte
e4180e406e
fix flake8
2014-09-21 14:44:22 +02:00
Fabrice Laporte
c1224caab5
Merge branch 'fetchart_issue848'
...
Conflicts:
test/test_embedart.py
2014-09-21 14:23:59 +02:00
Fabrice Laporte
f5520d7ec9
fix flake8 warnings
2014-09-20 12:27:27 +02:00
Fabrice Laporte
d684229816
skip art compare tests if no recent IM version
2014-09-20 12:26:36 +02:00
Thomas Scholtes
1e45ba597d
embed_item function does not raise if image file not found
...
Fixes #968
2014-09-18 16:19:05 +02:00