git.iko.soy/typeable/nixpkgs
on master help sign in
beets: Add patch for fixing bucket tests.

See, that's why I hate the gregorian calendar and new years eve: People tend to celebrate things that are absolutely irrelevant, like this comment. The test however assumed that either beets or its test suite would never survive 2015, so this test should assure it won't survive in >= 2015 :-) Anyway, the patch is from upstream master, so we can drop it once 1.3.10 is released. Signed-off-by: aszlig <aszlig@redmoonstudios.org>

commita6673133efda088c44d73f0c1ae752f59587e3f4 authoraszlig <aszlig@redmoonstudios.org> dateSun 4 Jan 2015, 16:34 (12 years ago) parentf3e9451
2 files changed+24
pkgs/tools/audio/beets/default.nix+1 pkgs/tools/audio/beets/test-bucket-fix-year.patch+23
pkgs/tools/audio/beets/default.nix+1
@@ -106,6 +106,7 @@ in buildPythonPackage rec {
106106 patches = [
107107 ./mediafile-codec-fix.patch
108108 ./replaygain-default-audiotools.patch
109+ ./test-bucket-fix-year.patch
109110 ];
110111
111112 postPatch = ''
pkgs/tools/audio/beets/test-bucket-fix-year.patchnew file+23
@@ -0,0 +1,23 @@
1+From 80038e2a3fe6f5ac174a30f6fd01ebf8dd63e414 Mon Sep 17 00:00:00 2001
2+From: Fabrice Laporte <kraymer@gmail.com>
3+Date: Sat, 3 Jan 2015 23:03:29 +0100
4+Subject: [PATCH] test_bucket: update test_year_single_year
5+
6+2015 was used as an example of date outside of [1970-current year] intervall which is not true anymore
7+---
8+ test/test_bucket.py | 2 +-
9+ 1 file changed, 1 insertion(+), 1 deletion(-)
10+
11+diff --git a/test/test_bucket.py b/test/test_bucket.py
12+index 4610ec7..060c360 100644
13+--- a/test/test_bucket.py
14++++ b/test/test_bucket.py
15+@@ -51,7 +51,7 @@ def test_year_single_year_last_folder(self):
16+ year."""
17+ self._setup_config(bucket_year=['1950', '1970'])
18+ self.assertEqual(self.plugin._tmpl_bucket('2014'), '1970')
19+- self.assertEqual(self.plugin._tmpl_bucket('2015'), '2015')
20++ self.assertEqual(self.plugin._tmpl_bucket('2025'), '2025')
21+
22+ def test_year_two_years(self):
23+ """Buckets can be named with the 'from-to' syntax."""