clan_lib: move test_flake_caching into clan_lib flake folder
This commit is contained in:
3
pkgs/clan-cli/clan_lib/conftest.py
Normal file
3
pkgs/clan-cli/clan_lib/conftest.py
Normal file
@@ -0,0 +1,3 @@
|
||||
pytest_plugins = [
|
||||
"clan_cli.tests.fixtures_flakes",
|
||||
]
|
||||
@@ -2,6 +2,7 @@ import logging
|
||||
|
||||
import pytest
|
||||
from clan_cli.tests.fixtures_flakes import ClanFlake
|
||||
|
||||
from clan_lib.flake.flake import (
|
||||
Flake,
|
||||
FlakeCache,
|
||||
@@ -332,10 +333,10 @@ def test_conditional_all_selector(flake: ClanFlake) -> None:
|
||||
assert isinstance(flake1._cache, FlakeCache) # noqa: SLF001
|
||||
assert isinstance(flake2._cache, FlakeCache) # noqa: SLF001
|
||||
log.info("First select")
|
||||
res1 = flake1.select("inputs.*.{?clan,?missing}")
|
||||
res1 = flake1.select("inputs.*.{?clan,?missing}.templates.*.*.description")
|
||||
|
||||
log.info("Second (cached) select")
|
||||
res2 = flake1.select("inputs.*.{?clan,?missing}")
|
||||
res2 = flake1.select("inputs.*.{?clan,?missing}.templates.*.*.description")
|
||||
|
||||
assert res1 == res2
|
||||
assert res1["clan-core"].get("clan") is not None
|
||||
@@ -227,7 +227,7 @@ pythonRuntime.pkgs.buildPythonApplication {
|
||||
touch $out
|
||||
'';
|
||||
}
|
||||
// {
|
||||
// lib.optionalAttrs (!stdenv.isDarwin) {
|
||||
# disabled on macOS until we fix all remaining issues
|
||||
clan-lib-pytest =
|
||||
runCommand "clan-lib-pytest"
|
||||
|
||||
Reference in New Issue
Block a user