mirror of
https://github.com/Mic92/nix-update.git
synced 2024-09-11 02:25:32 +03:00
test_cargo_lock_update was relying in Ruff 0.0.254 which used its own fork of LibCST. Ruff deprecated its fork [1] and removed the repository, hence this tests was failing trying to reach a defunct repository. [1] https://github.com/astral-sh/ruff/commit/072358e26
43 lines
1.1 KiB
Python
43 lines
1.1 KiB
Python
import subprocess
|
|
|
|
import conftest
|
|
|
|
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",
|
|
"cargoLock.update",
|
|
"--version",
|
|
"v0.4.7",
|
|
]
|
|
)
|
|
subprocess.run(
|
|
[
|
|
"nix",
|
|
"eval",
|
|
"--raw",
|
|
"--extra-experimental-features",
|
|
"nix-command",
|
|
"-f",
|
|
path,
|
|
"cargoLock.update.cargoDeps",
|
|
],
|
|
check=True,
|
|
text=True,
|
|
stdout=subprocess.PIPE,
|
|
).stdout.strip()
|
|
diff = subprocess.run(
|
|
["git", "-C", path, "show"],
|
|
text=True,
|
|
stdout=subprocess.PIPE,
|
|
check=True,
|
|
).stdout.strip()
|
|
print(diff)
|
|
assert "https://github.com/astral-sh/ruff/compare/v0.4.5...v0.4.7" in diff
|