Description: test_bucket: derive the out-of-range year from the clock
 test_year_single_year_last_folder checks that a year outside the
 [1970, current year] range keeps a bucket of its own. It did so with a
 hardcoded literal, which becomes wrong as soon as the real year reaches it:
 upstream used '2015', Debian #775618 moved it to '2025' in 2015, and that
 in turn started failing on 2026-01-01 ('1970' != '2025').
 .
 Derive the year from datetime.now() instead so the test cannot go stale
 again. Test-only change; no runtime code is touched.
Author: John Breton <john.breton@canonical.com>
Forwarded: not-needed
Last-Update: 2026-09-08
--- a/test/test_bucket.py
+++ b/test/test_bucket.py
@@ -18,6 +18,7 @@
 from __future__ import division, absolute_import, print_function
 
 import unittest
+from datetime import datetime
 from beetsplug import bucket
 from beets import config, ui
 
@@ -52,7 +53,12 @@
         year."""
         self._setup_config(bucket_year=['1950', '1970'])
         self.assertEqual(self.plugin._tmpl_bucket('2014'), '1970')
-        self.assertEqual(self.plugin._tmpl_bucket('2025'), '2025')
+        # A year outside [1970, current year] keeps its own bucket. Pick it
+        # relative to the clock: any literal here goes stale the moment the
+        # real year catches up (this assertion was '2015' until #775618, then
+        # '2025', which started failing on 2026-01-01).
+        future = '{0}'.format(datetime.now().year + 1)
+        self.assertEqual(self.plugin._tmpl_bucket(future), future)
 
     def test_year_two_years(self):
         """Buckets can be named with the 'from-to' syntax."""
