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
Adrian Sampson
68770f85e3
Update ALAC tests for Mutagen 1.26
...
The metadata extraction is now more accurate for ALACs, but we lost the
ability to distinguish them from AAC.
2014-11-10 10:06:21 -08:00
Fabrice Laporte
09bea52a41
fetchart: fix flake8
2014-11-09 20:55:53 +01:00
Fabrice Laporte
6170c3a179
fetchart: make test_art.py tests pass
2014-11-09 20:41:21 +01:00
Fabrice Laporte
1b694e569e
fetchart: add 'sources' option
...
Fasten cover search by enabling engines selection and prioritisation.
2014-11-08 23:20:44 +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
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
pscn
291675330d
Allow plugins to define the same flexible fields if they are of the same
...
type #1059
2014-11-04 21:20:35 +01:00
Adrian Sampson
832d658571
Use assertAlmostEqual ( #1054 )
...
Rounding and then comparing could lead to some surprising sensitivity. This
uses a known-good approximate comparison.
2014-11-01 13:08:07 -07:00
Adrian Sampson
256a3b4055
Tiny formatting tweaks ( #1054 )
2014-11-01 12:49:44 -07:00
Stig Inge Lea Bjørnsen
afee48379d
Add tests for the importadded plugin
...
The tests verifies that the `importadded` plugin updates added dates and
mtimes when importing:
* an album
* an album with file mtime preservation on
* singletons
* singletons with file mtime preservation on
It also verifies the the plugin doesn't update added dates when
re-importing:
* an album
* singletons
2014-11-01 15:32:27 +01:00
Adrian Sampson
8ed76298e3
Merge pull request #1043 from kiefermat/mediafile_comments_and_year
...
Added slash separator to DateField and more comments styles to MediaFile
2014-10-28 11:30:07 -07:00
Adrian Sampson
3c748b6cc8
Merge pull request #1042 from kiefermat/apev2_cover_support
...
Support for APEv2 cover tags
2014-10-28 11:03:00 -07:00
Matthias Kiefer
610942b1a5
Fixed getting description for wma file with standard WMA attributes
2014-10-28 10:28:12 +01:00
Matthias Kiefer
b02da5e150
Added test for date with slashed and fixed date regex
2014-10-28 08:52:03 +01:00
Matthias Kiefer
f8abb03b40
Added support for APEv2 cover tags
2014-10-27 16:10:17 +01:00
Thomas Scholtes
464f8cdc04
Types plugin: Field types for albums and documentation example
2014-10-27 10:54:21 +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
Adrian Sampson
c158bb630c
Fix mock function restoration in test :(
...
An argument for using decorators, context managers and stuff so this is
impossible to mess up.
2014-10-24 17:15:09 -07:00
Adrian Sampson
6aa9e60756
Add tests for #1029
...
The mbngs library does not like to be called with whitespace-only criteria.
2014-10-24 16:30:14 -07:00
Adrian Sampson
434280f248
A couple of coverage tweaks
2014-10-11 22:05:22 -07:00
Adrian Sampson
e949fe2d93
A bunch more tests for Results
2014-10-11 20:44:10 -07:00
Adrian Sampson
9d5fdbb37f
Fix concurrent iterators in incremental results
...
Some weird behavior was possible when having two iterators on the same Results
object. May seem far-fetched, but it is possible. As an added bonus, this
saves a little memory by disposing of rows when they have been materialized
into model objects.
2014-10-11 20:30:33 -07:00
Fabrice L.
e6bf8c21d8
Merge pull request #992 from KraYmer/lyrics-coverage
...
Improve lyrics coverage
2014-10-09 22:11:28 +02:00
Fabrice Laporte
4386d9d4df
skip test involving bs4 if python version too low
2014-10-09 08:23:20 +02:00
Fabrice Laporte
b32838b519
fix flake8
2014-10-09 06:47:23 +02:00
Fabrice Laporte
2b908b48bc
lastgenre: use an ordinary Item instead of a Mock
2014-10-09 06:38:40 +02:00
Fabrice Laporte
b95990ee9c
lastgenre: add unit tests
2014-10-09 00:00:26 +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
9992d65366
test_lyrics: add onelyrics.net source
2014-10-08 14:44:43 +02:00
Adrian Sampson
2b1353a4f1
Malformed date queries no longer crash
2014-10-04 16:50:50 -07:00
Adrian Sampson
06b4730105
Re-import tests: stub out *_for_id functions
...
Currently, these just return no results. (For our testing purposes, the
matches we get from the ordinary metadata search suffice just fine.)
2014-09-28 11:39:04 -07:00
Adrian Sampson
a3eef35ba8
Test singleton re-imports
2014-09-28 11:16:38 -07:00
Adrian Sampson
f367a0971c
Re-import test: check item-level data preserved
2014-09-28 11:04:25 -07:00
Adrian Sampson
e8d2ade167
Basic re-import tests
2014-09-28 10:58:43 -07:00
Fabrice L.
54c9761135
Merge pull request #981 from KraYmer/lyrics-enh
...
Lyrics scraping code refactored
2014-09-27 11:25:06 +02:00
Adrian Sampson
4f2d7e0aaa
Merge pull request #974 from KraYmer/fetchart_issue848_2
...
embedart: write candidate image only if it is "similar" to already embedded one (suite)
2014-09-25 15:25:46 -07: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
Adrian Sampson
fc2c75ee9c
Tests for mkdirall
...
A red herring. I thought this might be responsible for #969 .
2014-09-23 18:49:38 -07:00
Fabrice Laporte
333591fd78
no html entities in _scrape_streamline_soup output
2014-09-24 00:25:50 +02:00
Fabrice Laporte
da6bcda4af
add lyrics rsrc files
2014-09-23 18:05:08 +02:00
Fabrice Laporte
7e3676ecc9
sort sources in alphabetical order
...
remove test_sources_fail() (all sources pass now)
2014-09-23 18:01:05 +02:00
Fabrice Laporte
a938e68c98
refactor scrape_lyrics_from_url into smaller functions
2014-09-23 13:21:31 +02:00
Fabrice Laporte
168a24ad77
test_lyrics.py: improve lyrics module coverage
2014-09-22 17:28:02 +02:00
Fabrice Laporte
1dd4ca1d81
lyrics_sources: put sources in their correct category
2014-09-22 17:21:29 +02: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
79d1203541
Remove unnecessary method on ImportTask
2014-09-18 19:32:29 +02:00
Thomas Scholtes
56aba87fdc
convert: Test skip existing files
...
Reproduces #970
2014-09-18 17:01:17 +02:00
Thomas Scholtes
d0ac66bfe6
Fix oldstyle object initializer for py26
2014-09-18 16:51:11 +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
Fabrice Laporte
cf372f72a6
reduce image sizes
2014-09-17 22:57:50 +02:00
Fabrice Laporte
3ec8902ea4
embedart: add tests for 'compare_threshold' option
...
was tricky to write meaningful tests when computing phash of existing 6
pixels image (image-2x3.jpg) so I added new -more representatives-
images.
2014-09-17 22:04:45 +02:00
Thomas Scholtes
db391c8f20
zero: Only changes media file tags not database
...
Uses the new API from the previous commit and fixes #963 .
There is a possible issue with backwards compatibility: Changes to the
item in the 'write' event do not propagate to the tags anymore. But I'm
not aware of other plugins that use the API in that way.
2014-09-17 12:17:20 +02:00
Thomas Scholtes
0bf7c06f7d
Media file tags can be customized with the `write` event
2014-09-17 12:05:17 +02:00
Thomas Scholtes
ad71af2c3d
Add NoneQuery
...
This makes fast SQL queries for singletons possible
2014-09-17 11:23:00 +02:00
Adrian Sampson
5f2ca0b75b
Rename smartartist to artist/albumartist ( #953 )
...
This is basically always what you want, so now you can just use the name of
the field without "smart".
2014-09-16 14:53:16 -07:00
Adrian Sampson
2795a01e28
Default sort configuration is global ( #953 )
...
It would be nice to cache the Sort object so we didn't have to re-parse this
every time...
2014-09-16 14:34:21 -07:00
Adrian Sampson
0bdd0c7159
Fix mocking in Spotify tests
...
The mock wasn't being triggered; these tests were going to the network. Now we
don't match on the query string and instead test that it was correct by
actually parsing it.
2014-09-16 10:43:53 -07:00
Thomas Scholtes
9a382eb581
Test importing unmatched tracks
2014-09-16 13:44:33 +02:00
Thomas Scholtes
e579db6f0a
Hide task specific code from importer stage
2014-09-16 12:52:15 +02:00
Adrian Sampson
f9c6dd6d67
Move SmartArtistSort to library ( #953 )
...
Models can now have a dict of special sort classes.
2014-09-15 19:43:22 -07:00
Thomas Scholtes
a92493cf12
Test queries on boolean fields
2014-09-15 00:48:18 +02:00
Thomas Scholtes
e5da5757c0
Preserve state in query tests
2014-09-15 00:36:24 +02:00
Adrian Sampson
72436644a6
Merge pull request #909 from arogl/master
...
Clean up of logging messages as described here
2014-09-14 13:14:35 -07:00
Adrian Sampson
8ec4f8bc24
Merge pull request #958 from geigerzaehler/item-sync
...
Update database mtimes in modify and write commands
2014-09-14 12:09:55 -07:00
Thomas Scholtes
b86669fe05
Add integer query tests
2014-09-14 16:11:13 +02:00
Thomas Scholtes
84acf17855
Test that mtimes are updated when writing files
...
Follows the discussion in #937 and the wiki [1].
[1]: https://github.com/sampsyo/beets/wiki/Architecture#modification-times-mtime
2014-09-14 14:19:11 +02:00
Thomas Scholtes
3fe52a7694
Add test helpers to create database fixtures
2014-09-14 14:16:34 +02:00
Thomas Scholtes
bd871cbc03
Don’t interact with files in TypePluginTest
2014-09-14 14:00:34 +02:00
Thomas Scholtes
ffc75c333d
Merge branch 'flextypes'
2014-09-14 13:16:43 +02:00
Adrian Sampson
d081b6a220
Docs for types plugin
2014-09-14 12:35:47 +02:00
Thomas Scholtes
d4f72f62eb
echonest: set types for flexible fields
...
Conflicts:
beetsplug/echonest.py
2014-09-14 12:34:46 +02:00
Thomas Scholtes
aa24fa7c1b
Fix tests on python2.6
2014-09-14 12:34:46 +02:00
Thomas Scholtes
f112c9610c
Add 'types' plugin for flexible field types
...
Conflicts:
beets/library.py
2014-09-14 12:34:46 +02:00
Thomas Scholtes
475d4899ee
Add tests for plugins providing flexible field types
2014-09-14 12:34:45 +02:00
Thomas Scholtes
9a732fbd26
Converted files are tagged and checked in tests
...
The conversion function either copies files or runs the conversion
command on them, depending on the result of the `should_transcode()`
function. This commit makes the tests more sensitive to these cases.
2014-09-14 12:17:05 +02:00
Thomas Scholtes
9e9f645e59
convert: add cli flag to skip confirmation
...
The flag mirrors the `--yes` flag from the modify command.
2014-09-14 11:46:24 +02:00
Thomas Scholtes
75a28de543
Extend and refactor 'never_convert_lossy_files' tests
...
* Each test function only uses on fixture, so we create fixtures in the
test functions and not in the `setup()` method.
* We test the effect of the option set to true and false.
2014-09-14 11:35:01 +02:00
Thomas Scholtes
a37cabb969
Make 'never_convert_lossy_files' tests more meaningful
...
We should expect the original file extensions to be preserved since we
do not transcode lossy files. The tests now fail, but a fix is coming
up.
2014-09-14 11:17:43 +02:00
Adrian Sampson
af60272cc5
Merge pull request #956 from voidus/master
...
Added never_convert_lossy_files option to convert plugin
2014-09-13 23:45:16 -07:00
Adrian Sampson
2b921b19fd
NullSort instead of None
...
A more descriptive placeholder for "don't sort".
2014-09-13 20:38:31 -07:00
Adrian Sampson
76c831a1cd
Merge branch 'master' of github.com:sampsyo/beets
2014-09-13 17:19:04 -07:00
Adrian Sampson
4870d7e0fa
Roll back fast flexible field sorts ( #953 )
...
Sad to see them go, but happy be rid of the SQL injection.
2014-09-13 17:16:12 -07:00
Simon Kohlmeyer
ee6f3dba1b
fix coding style errors
2014-09-13 19:51:23 +02:00
Simon Kohlmeyer
9d55179d2d
Added never_convert_lossy_files option to convert plugin
...
When set to true, this config option chooses copying over converting when the
source file is in a lossy format. At the moment, everything except ape, flac,
alac and wav is considered lossy.
2014-09-13 19:07:25 +02:00
Thomas Scholtes
89c82dc63d
fetchart: correctly handle path encoding
...
* Ensure that `config.as_str_seq()` returns a list of unicode objects.
* Map these to bytestring paths so we can compare them to other paths.
Fixes #887
2014-09-13 16:49:34 +02:00
Thomas Scholtes
0bb6348df3
fetchart: Add test that reproduces #887
2014-09-13 16:39:39 +02:00