poetry2nix/tests/path-deps-develop/default.nix
Jairo Llopis 1baca43506
fix: support nullified editablePackageSources in mkPoetryEnv
See these docs: 99c7956835/README.md (L86)

They say that any dependency passed as `null` is forced to be non editable, even if it is marked as `develop = true` in `pyproject.toml`.

However, this was not being the case.

Added a test to prove the need for the fix.

@moduon MT-83
2022-04-14 09:29:55 +01:00

21 lines
415 B
Nix

{ lib, poetry2nix, python3, runCommand }:
let env = poetry2nix.mkPoetryEnv {
python = python3;
projectDir = ./.;
editablePackageSources = {
dep1 = null;
};
};
in
lib.debug.runTests {
testDepFound = {
expected = "0\n";
expr = builtins.readFile (runCommand "path-deps-develop-import" { } ''
echo using ${env}
${env}/bin/python -c 'import dep1'
echo $? > $out
'');
};
}