wisp3rwind
1ef6b90786
add missing syspath conversions (1/3, tests)
...
these are mostly in the tests, which didn't cause issues since the
affected directories usually have nice ASCII paths. For consistency, it
is nicer to always invoke syspath. That also avoids deprecation warnings
for the bytestring interfaces on Python <= 3.5. The bytestring
interfaces were undeprecated with PEP 529 in Python 3.6, such that we
didn't observe any actual failures.
2023-06-24 14:52:46 +02:00
J0J0 Todos
2bcf16b10c
Fix linter error in test_embedart
2023-04-22 08:23:38 +02:00
J0J0 Todos
8af31058e8
Fix a typo in test_embedart
2023-04-21 21:56:42 +02:00
J0J0 Todos
56adba719b
Fix text/html file ending in embedart -u test
...
Makes it more clear what we are doing.
2023-04-21 21:22:27 +02:00
J0J0 Todos
f3d4929638
Fix embedart -u test names
...
and shorten second and third test a little by providing -y cli flag. Enough to
test with interactive input once. Move all 3 tests to the very bottom of the
test class.
2023-04-21 20:12:16 +02:00
Alok Saboo
47cb11bad7
Add test for invalid URL
2023-04-21 08:31:36 -04:00
Alok Saboo
919f326400
Add test for png image
2023-04-21 08:23:12 -04:00
J0J0 Todos
3dd32c93dc
Add test for embedart -u fetching jpeg from url
2023-04-21 07:59:16 +02:00
wisp3rwind
d5f998b312
tests: fix assertions for empty MediaFile.images
...
used to work due to inconsistent mediafile implementation, but with
https://github.com/beetbox/mediafile/pull/64 (in mediafile >= 0.11.0)
list fields are None if non-existent, not the empty list
2022-12-18 08:41:42 +01:00
wisp3rwind
e44a08eeb6
artresizer: style fixes
2022-03-12 23:34:46 +01:00
wisp3rwind
8a969e3041
artresizer: backend classes part 1: stub classes, version checks
2022-03-12 19:48:45 +01:00
wisp3rwind
1815d08392
artresizer: fix image comparison test
...
Since the ImageMagick based comparison is now abstracted via ArtResizer,
it becomes a little more involved to mock it for testing.
2022-02-14 22:52:00 +01:00
wisp3rwind
a17a5f2fa6
art: move the backend-specific code to util.artresizer
...
all the other backend-specific code is already there.
2022-02-12 22:45:19 +01: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
Carl Suster
546bf3af7e
mediafile: import from standalone module
2019-05-29 09:35:14 +10:00
konman2
578143ae12
updated to pass pep8 checks
2017-10-07 21:28:33 -07:00
konman2
fdeef05cc9
clearart asks for permission before deleting embedded albumart
2017-10-07 20:42:01 -07:00
Aaron
64d69f0817
embedart: Added test case for inputting “no” option interactively.
2017-03-10 23:30:49 -08:00
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