From d5e32af58152568b1a87c57c3600caa9312ee873 Mon Sep 17 00:00:00 2001 From: Sebastian Mohr Date: Wed, 17 Sep 2025 19:18:48 +0200 Subject: [PATCH] Renamed PluginTestCasePytest to PluginTest --- beets/test/helper.py | 4 ++-- test/plugins/test_importfeeds.py | 4 ++-- test/plugins/test_inline.py | 2 ++ test/plugins/test_lastgenre.py | 4 ++-- test/plugins/test_titlecase.py | 4 ++-- test/test_plugins.py | 7 +++---- 6 files changed, 13 insertions(+), 12 deletions(-) diff --git a/beets/test/helper.py b/beets/test/helper.py index eb3e4839c..9b884e866 100644 --- a/beets/test/helper.py +++ b/beets/test/helper.py @@ -685,7 +685,7 @@ def get_available_plugins(): ] -class PluginTestCasePytest(PluginMixin, TestHelper): +class PluginTest(PluginMixin, TestHelper): @pytest.fixture(autouse=True) def _setup_teardown(self): self.setup_beets() @@ -694,7 +694,7 @@ class PluginTestCasePytest(PluginMixin, TestHelper): class PluginTestCase(PluginMixin, BeetsTestCase): - """DEPRECATED: Use PluginTestCasePytest instead for new code!""" + """DEPRECATED: Use PluginTestCase instead for new code using pytest!""" pass diff --git a/test/plugins/test_importfeeds.py b/test/plugins/test_importfeeds.py index 3f51eca76..1d1bc8f10 100644 --- a/test/plugins/test_importfeeds.py +++ b/test/plugins/test_importfeeds.py @@ -2,11 +2,11 @@ import datetime import os from beets.library import Album, Item -from beets.test.helper import PluginTestCase +from beets.test.helper import PluginTest from beetsplug.importfeeds import ImportFeedsPlugin -class ImportFeedsTest(PluginTestCase): +class ImportFeedsTest(PluginTest): plugin = "importfeeds" def setUp(self): diff --git a/test/plugins/test_inline.py b/test/plugins/test_inline.py index 79118bd06..0a48c9d34 100644 --- a/test/plugins/test_inline.py +++ b/test/plugins/test_inline.py @@ -18,6 +18,8 @@ from beetsplug.inline import InlinePlugin class TestInlineRecursion(PluginTestCase): + plugin = "inline" + def test_no_recursion_when_inline_shadows_fixed_field(self): config["plugins"] = ["inline"] diff --git a/test/plugins/test_lastgenre.py b/test/plugins/test_lastgenre.py index 12ff30f8e..fc97c317d 100644 --- a/test/plugins/test_lastgenre.py +++ b/test/plugins/test_lastgenre.py @@ -19,11 +19,11 @@ from unittest.mock import Mock, patch import pytest from beets.test import _common -from beets.test.helper import PluginTestCase +from beets.test.helper import PluginTest from beetsplug import lastgenre -class LastGenrePluginTest(PluginTestCase): +class LastGenrePluginTest(PluginTest): plugin = "lastgenre" def setUp(self): diff --git a/test/plugins/test_titlecase.py b/test/plugins/test_titlecase.py index c25661bbf..54e2ff105 100644 --- a/test/plugins/test_titlecase.py +++ b/test/plugins/test_titlecase.py @@ -19,7 +19,7 @@ from unittest.mock import patch from beets.autotag.hooks import AlbumInfo, TrackInfo from beets.importer import ImportSession, ImportTask from beets.library import Item -from beets.test.helper import PluginTestCase +from beets.test.helper import PluginTest from beetsplug.titlecase import TitlecasePlugin titlecase_fields_testcases = [ @@ -55,7 +55,7 @@ titlecase_fields_testcases = [ ] -class TestTitlecasePlugin(PluginTestCase): +class TestTitlecasePlugin(PluginTest): plugin = "titlecase" preload_plugin = False diff --git a/test/test_plugins.py b/test/test_plugins.py index a3b8f8e59..448a567d7 100644 --- a/test/test_plugins.py +++ b/test/test_plugins.py @@ -34,14 +34,13 @@ from beets.test.helper import ( AutotagStub, ImportHelper, PluginMixin, - PluginTestCase, - PluginTestCasePytest, + PluginTest, TerminalImportMixin, ) from beets.util import PromptChoice, syspath -class TestPluginRegistration(PluginTestCasePytest): +class TestPluginRegistration(PluginTest): """Ensure that we can dynamically add a plugin without creating actual files on disk. @@ -103,7 +102,7 @@ class TestPluginRegistration(PluginTestCasePytest): Album._types -class TestPluginListeners(PluginTestCasePytest, ImportHelper): +class TestPluginListeners(PluginTest, ImportHelper): """Test that plugin listeners are registered and called correctly.""" class DummyPlugin(plugins.BeetsPlugin):