Skip to content

Commit

Permalink
Merge pull request #314 from Mic92/merge-when-green-joerg
Browse files Browse the repository at this point in the history
reformat
  • Loading branch information
Mic92 authored Jan 4, 2025
2 parents b13ad79 + 0e0565e commit 05a74f0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
15 changes: 13 additions & 2 deletions tests/test_version_regex_no_rev.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
import subprocess
from pathlib import Path

import conftest

from pathlib import Path
from nix_update import main


def test_main(helpers: conftest.Helpers) -> None:
with helpers.testpkgs(init_git=True) as path:
main(["--file", str(path), "--commit", "net-news-wire", "--version-regex", "^mac-(\\d+\\.\\d+\\.\\d+)$"])
main(
[
"--file",
str(path),
"--commit",
"net-news-wire",
"--version-regex",
"^mac-(\\d+\\.\\d+\\.\\d+)$",
]
)
version = get_nix_value(path, "net-news-wire.version")
src = get_nix_value(path, "net-news-wire.src")
commit = subprocess.run(
Expand All @@ -22,6 +32,7 @@ def test_main(helpers: conftest.Helpers) -> None:
assert version in commit
assert "net-news-wire: 6.1.5 ->" in commit


def get_nix_value(path: Path, key: str) -> str:
return subprocess.run(
[
Expand Down
1 change: 0 additions & 1 deletion tests/testpkgs/net-news-wire.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
stdenvNoCC,
fetchurl,
nix-update-script,
}:

stdenvNoCC.mkDerivation rec {
Expand Down

0 comments on commit 05a74f0

Please sign in to comment.