Zsin Skri
154e6cfca8
improve tests prefer_specific without canonical
...
This improves the tests for the changes introduced in
commit cef9a331 LastGenre: allow prefer_specific without canonical.
2018-07-01 09:19:36 +02:00
Zsin Skri
96120d5c6d
LastGenre test: prefer_specific without canonical
...
This tests commit cef9a331 .
2018-06-30 22:38:56 +02:00
Zsin Skri
0f847aefcb
LastGenre tests: setup_config: add prefer_specific
...
Allow to specify prefer_specific in lastgenre tests configuration setup.
2018-06-30 22:37:28 +02:00
Jakub Turski
f6830b4bc3
Here, flake8, be happy.
2017-06-02 16:27:49 +01:00
Jakub Turski
0e7a0a62d4
Fix excessive line length.
2017-06-02 16:04:05 +01:00
Jakub Turski
a43f5fdace
Remove unnecessary test setup parameter.
2017-06-02 15:50:58 +01:00
Jakub Turski
ee46a5150f
Don't crash if non-canonical genre and prefer_specific: yes.
...
Also, add a test for this.
2017-06-02 15:48:05 +01: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
Johnny Robeson
e57b7faf69
replace basestring with six.text_types
2016-06-24 05:53:55 -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
d3d02e18b9
Removed unicode_literals from test_lastgenere
2016-02-22 16:56:02 +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
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
1f0932968e
Simple test fixes
...
importfeeds, lastgenre
2015-01-06 21:42:10 +01: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
Thomas Gordon
98adb35e3f
Change expected result for compatibility with updated genres-tree.yaml
2014-09-06 08:51:31 -04:00
Fabrice Laporte
df47f19e86
lastgenre: remove duplicate genres
2014-06-28 10:31:12 +02:00
Adrian Sampson
233f71a457
Use real booleans for whitelist/canonical options
...
As opposed to the strings "true" and "false".
2014-04-28 23:00:00 -07:00
Adrian Sampson
add309b57d
Isolate lastgenre tests
...
We now appropriately set up and tear down the fixture for the lastgenre tests.
(This was causing unpredictable failures elsewhere before.)
2014-04-28 22:35:32 -07:00
Fabrice Laporte
ef3c1cd1ff
use booleans for whitelist and c14n options
...
homogenise options setup using booleans, while keeping the empty string
(synonym of ‘true’) for backward compatibility.
2014-04-28 10:31:22 +02:00
Adrian Sampson
d5dbaeff7a
lastgenre: Restore default whitelist
2014-04-27 13:54:32 -07:00
Adrian Sampson
dfd9a4c397
Merge branch 'KraYmer-lastgenre-tests-new' into lastgenre-tests-new
...
Conflicts:
test/test_lastgenre.py
2014-04-27 13:52:06 -07:00
Fabrice Laporte
d1cc95984e
Rename/add tests
...
Rewrite tests now that empty whitelist is allowed.
2014-04-27 22:32:31 +02:00
Fabrice Laporte
0613cb7d13
Update _setup_config
...
Give an empty string to obtain default whitelist, None for no whitelist
or a stringlist for a custom one.
2014-04-27 22:31:31 +02:00
Fabrice L.
e442749cd4
add a test that would fail with the restricted whitelist approach
...
If no option is set, valid genres should not be rejected. Which is an argument
to have a wide default whitelist.
2014-04-27 16:05:16 +02:00
Fabrice Laporte
e399173f7e
add a test that would fail with the restricted whitelist approach
...
If no option is set, valid genres should not be rejected. Which is an argument
to have a wide default whitelist.
2014-04-27 15:59:43 +02:00
Fabrice Laporte
d0d3c18da2
lastgenre: rewrite filtering logic to make tests pass
...
- remove filter_tags() as genres should not be removed this soon while
c14n has not been applied
- group all filtering logic in the function _resolve_genres (formerly
_strings_to_genre)
2014-04-26 20:51:13 -07:00
Fabrice Laporte
2e8e55736d
get rid of module level options variable
...
Conflicts:
beetsplug/lastgenre/__init__.py
2014-04-26 20:51:00 -07:00
Fabrice Laporte
4e5bb262a7
wip: rewrite setup_config
2014-04-26 20:50:04 -07:00
Fabrice Laporte
21f1607e8f
lastgenre: add tests functions
2014-04-26 20:50:04 -07:00
Fabrice Laporte
3d30708839
add test_lastgenre.py
2014-04-26 20:50:04 -07:00