Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Future proof BucketPluginTest.test_year_single_year_last_folder #5566

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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."""

from datetime 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
Loading