Commit graph

22 commits

Author SHA1 Message Date
Andrew Rogl
1ec87a3bdd pyupgrade beetsplug and tests
All tests working
More tidy up to be done
2021-08-26 19:12:51 +10: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
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
908f684d0a Removed import of unicode_literals from test_bucket 2016-02-22 07:38:05 +01:00
Jack Wilsdon
12cd5306b7 Update copyright dates to 2016 2015-12-30 15:42:06 +00:00
Peter Kessen
21f1f53fea added test for bucket plugin 2015-09-27 14:45:17 +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
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
Adrian Sampson
59f5fc7f7f Remove nose dependency 2015-01-05 10:16:10 -08:00
Fabrice Laporte
80038e2a3f test_bucket: update test_year_single_year
2015 was used as an example of date outside of [1970-current year] intervall which is not true anymore
2015-01-03 23:03:29 +01:00
Adrian Sampson
e5c5e1858c Changelog for #851 (bucket improvements) 2014-07-01 14:40:39 -07:00
Alexander Elbs
9ca816f247 the bucket plugin transforms a pattern like 'A - D' into something that
matches all letters starting with A to D (upper and lower case). This
change allows to put more artists into that bucket. E.g. artists
starting with ä or Ä and 0 to 9 and … (three dots)

Example config for overriding a bucket pattern:

  bucket:
     bucket_alpha: ['A - D', 'E - L', 'M - R', 'S - Z']
     bucket_alpha_regex:
       'A - D': ^[0-9a-dA-D…äÄ]
2014-06-30 20:55:28 +02:00
Fabrice Laporte
02f7e78fd3 fix flake8 warnings 2014-05-10 10:57:44 +02:00
Fabrice Laporte
21feab7ab1 add tests to check bad buckets definitions
message is now printed to the user when buckets declared in the config
file cannot be parsed
2014-05-10 10:55:38 +02:00
Fabrice Laporte
4add189608 Add option to extrapolate year buckets names
- spans are now tracked via a list of dicts instead of 2 lists
previously (simpler code)
- extend_year_spans() pregenerates all possible ranges at plugin setup
stage
- a BucketError is now raised if declared bucket format not accepted
2014-05-08 01:28:17 +02:00
Fabrice Laporte
509af59d4e cleanup docstrings and add tests 2014-05-04 08:51:11 +02:00
Fabrice Laporte
31569baba7 fix range upper bound + tests added 2014-05-03 23:46:31 +02:00
Fabrice Laporte
581bf768ca add buckets plugin + tests
Add a new template functions %bucket(text, field) for path formatting.
2014-05-03 13:55:21 +02:00