Renamed PluginTestCasePytest to PluginTest

This commit is contained in:
Sebastian Mohr 2025-09-17 19:18:48 +02:00
parent c41391f48a
commit d5e32af581
6 changed files with 13 additions and 12 deletions

View file

@ -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

View file

@ -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):

View file

@ -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"]

View file

@ -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):

View file

@ -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

View file

@ -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):