mirror of
https://github.com/Mic92/nix-update.git
synced 2024-09-11 02:25:32 +03:00
test non-toplevel attributes
This commit is contained in:
parent
58c48cfa0d
commit
fd07282345
@ -8,7 +8,7 @@ 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", "cargoLockExpand", "--version", "v0.3.8"]
|
||||
["--file", str(path), "--commit", "cargoLock.expand", "--version", "v0.3.8"]
|
||||
)
|
||||
subprocess.run(
|
||||
[
|
||||
@ -19,7 +19,7 @@ def test_main(helpers: conftest.Helpers) -> None:
|
||||
"nix-command",
|
||||
"-f",
|
||||
path,
|
||||
"cargoLockExpand.cargoDeps",
|
||||
"cargoLock.expand.cargoDeps",
|
||||
],
|
||||
check=True,
|
||||
text=True,
|
||||
@ -32,6 +32,7 @@ def test_main(helpers: conftest.Helpers) -> None:
|
||||
check=True,
|
||||
).stdout.strip()
|
||||
print(diff)
|
||||
assert "cargoLock.expand: 0.3.7 -> 0.3.8"
|
||||
assert "Cargo.lock" in diff
|
||||
assert '+source = "git+' in diff
|
||||
assert "outputHashes" in diff
|
||||
|
@ -12,7 +12,7 @@ def test_main(helpers: conftest.Helpers) -> None:
|
||||
"--file",
|
||||
str(path),
|
||||
"--commit",
|
||||
"cargoLockUpdate",
|
||||
"cargoLock.update",
|
||||
"--version",
|
||||
"v0.0.255",
|
||||
]
|
||||
@ -26,7 +26,7 @@ def test_main(helpers: conftest.Helpers) -> None:
|
||||
"nix-command",
|
||||
"-f",
|
||||
path,
|
||||
"cargoLockUpdate.cargoDeps",
|
||||
"cargoLock.update.cargoDeps",
|
||||
],
|
||||
check=True,
|
||||
text=True,
|
||||
|
@ -1,7 +1,7 @@
|
||||
{ pkgs ? import <nixpkgs> { } }:
|
||||
{
|
||||
cargoLockExpand = pkgs.callPackage ./cargo-lock-expand { };
|
||||
cargoLockUpdate = pkgs.callPackage ./cargo-lock-update { };
|
||||
cargoLock.expand = pkgs.callPackage ./cargo-lock-expand { };
|
||||
cargoLock.update = pkgs.callPackage ./cargo-lock-update { };
|
||||
crate = pkgs.callPackage ./crate.nix { };
|
||||
gitea = pkgs.callPackage ./gitea.nix { };
|
||||
github = pkgs.callPackage ./github.nix { };
|
||||
|
Loading…
Reference in New Issue
Block a user