mirror of
https://github.com/nathom/streamrip.git
synced 2025-05-29 06:25:34 -04:00
Implement check for updates feature (#558)
* Implement check for updates * Fix tests * Bump version
This commit is contained in:
parent
8bc87a4b74
commit
fa65929c97
9 changed files with 52 additions and 20 deletions
Binary file not shown.
|
@ -127,7 +127,7 @@ def test_sample_config_data_fields(sample_config_data):
|
|||
bit_depth=24,
|
||||
lossy_bitrate=320,
|
||||
),
|
||||
misc=MiscConfig(version="2.0"),
|
||||
misc=MiscConfig(version="2.0", check_for_updates=True),
|
||||
_modified=False,
|
||||
)
|
||||
assert sample_config_data.downloads == test_config.downloads
|
||||
|
|
|
@ -185,4 +185,5 @@ max_search_results = 100
|
|||
|
||||
[misc]
|
||||
# Metadata to identify this config file. Do not change.
|
||||
version = "2.0"
|
||||
version = "2.0.3"
|
||||
check_for_updates = true
|
||||
|
|
|
@ -24,19 +24,9 @@ def config_version() -> str | None:
|
|||
return m.group(1)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def click_version() -> str | None:
|
||||
r = re.compile(r'\@click\.version_option\(version="([\d\.]+)"\)')
|
||||
with open("streamrip/rip/cli.py") as f:
|
||||
m = r.search(f.read())
|
||||
assert m is not None
|
||||
return m.group(1)
|
||||
|
||||
|
||||
def test_config_versions_match(config_version):
|
||||
assert config_version == CURRENT_CONFIG_VERSION
|
||||
|
||||
|
||||
def test_streamrip_versions_match(pyproject_version, click_version):
|
||||
assert pyproject_version == click_version
|
||||
assert click_version == init_version
|
||||
def test_streamrip_versions_match(pyproject_version):
|
||||
assert pyproject_version == init_version
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue