test non-toplevel attributes

This commit is contained in:
figsoda 2023-08-06 14:40:40 -04:00
parent 58c48cfa0d
commit fd07282345
3 changed files with 7 additions and 6 deletions

View File

@ -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

View File

@ -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,

View File

@ -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 { };