-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This streamlines the release action a bit and adds a test to ensure the plugin version matches in all places.
- Loading branch information
Showing
6 changed files
with
59 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,5 @@ mypy>=0.991 | |
pylint>=2.15.9 | ||
pytest>=7.1.3 | ||
reflink>=0.2.1 | ||
toml>=0.10.2 | ||
tox>=3.25.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
""" | ||
Tests that the version specified for the plugin matches the value in pyproject. | ||
""" | ||
|
||
import toml # type: ignore # pylint: disable=import-error | ||
|
||
import beetsplug | ||
from tests.helper import FiletoteTestCase | ||
|
||
|
||
class FiletoteVersionTest(FiletoteTestCase): | ||
""" | ||
Tests that the version specified for the plugin matches the value in | ||
pyproject. | ||
""" | ||
|
||
def setUp(self, audible_plugin: bool = False) -> None: | ||
"""Provides shared setup for tests.""" | ||
super().setUp() | ||
|
||
def test_version_matches(self) -> None: | ||
"""Ensure that the Filetote version is properly reflected in the right | ||
areas.""" | ||
|
||
plugin_version = beetsplug.__version__ | ||
|
||
with open("./pyproject.toml", "r", encoding="utf-8") as pyproject_file: | ||
data = toml.load(pyproject_file) | ||
|
||
toml_version = data["tool"]["poetry"]["version"] | ||
|
||
self.assertions.assertEqual(plugin_version, toml_version) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,5 +44,6 @@ deps = | |
beets-audible | ||
mediafile | ||
reflink | ||
toml | ||
commands = | ||
{envpython} -m pytest tests |