Skip to content

Commit

Permalink
Future proof BucketPluginTest.test_year_single_year_last_folder
Browse files Browse the repository at this point in the history
2025 won't be in the future, forever.

Fixes: https://bugs.debian.org/1091495
  • Loading branch information
stefanor committed Dec 27, 2024
1 parent faf7529 commit 34797a0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/plugins/test_bucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

"""Tests for the 'bucket' plugin."""

import datetime

import pytest

from beets import config, ui
Expand Down Expand Up @@ -51,7 +53,8 @@ def test_year_single_year_last_folder(self):
year."""
self._setup_config(bucket_year=["1950", "1970"])
assert self.plugin._tmpl_bucket("2014") == "1970"
assert self.plugin._tmpl_bucket("2025") == "2025"
next_year = datetime.now().year + 1
assert self.plugin._tmpl_bucket(str(next_year)) == str(next_year)

def test_year_two_years(self):
"""Buckets can be named with the 'from-to' syntax."""
Expand Down

0 comments on commit 34797a0

Please sign in to comment.