Merge pull request #100717 from veehaitch/fix-yq
pythonPackages.yq: Fix tests
This commit is contained in:
commit
6502a6748c
|
@ -10,7 +10,6 @@
|
||||||
, flake8
|
, flake8
|
||||||
, jq
|
, jq
|
||||||
, pytest
|
, pytest
|
||||||
, unixtools
|
|
||||||
, toml
|
, toml
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
@ -23,6 +22,10 @@ buildPythonPackage rec {
|
||||||
sha256 = "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl";
|
sha256 = "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace test/test.py --replace "expect_exit_codes={0} if sys.stdin.isatty() else {2}" "expect_exit_codes={0}"
|
||||||
|
'';
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
pyyaml
|
pyyaml
|
||||||
xmltodict
|
xmltodict
|
||||||
|
@ -32,7 +35,6 @@ buildPythonPackage rec {
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
checkInputs = [
|
checkInputs = [
|
||||||
unixtools.script
|
|
||||||
pytest
|
pytest
|
||||||
coverage
|
coverage
|
||||||
flake8
|
flake8
|
||||||
|
@ -40,8 +42,7 @@ buildPythonPackage rec {
|
||||||
toml
|
toml
|
||||||
];
|
];
|
||||||
|
|
||||||
# tests fails if stdin is not a tty
|
checkPhase = "pytest ./test/test.py";
|
||||||
checkPhase = "echo | script -c 'pytest ./test/test.py'";
|
|
||||||
|
|
||||||
pythonImportsCheck = [ "yq" ];
|
pythonImportsCheck = [ "yq" ];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue