about summary refs log tree commit diff
path: root/pkgs/development/python-modules/yq
diff options
context:
space:
mode:
authorVincent Haupert <mail@vincent-haupert.de>2020-10-16 13:47:11 +0200
committerVincent Haupert <mail@vincent-haupert.de>2020-10-16 13:47:11 +0200
commit5f6707d1b5420cf2826202ccae9b11aefef72277 (patch)
tree7211da7bec42a196729fe919d2c2d2e84825bb5f /pkgs/development/python-modules/yq
parente7add4afc1615e12474a79098b897e11686953b7 (diff)
Revert "python3.pkgs.yq: make stdin a tty for tests"
This reverts commit 40a58cc65bec0ed5b784178239e55f7c7ac969f5.
Diffstat (limited to 'pkgs/development/python-modules/yq')
-rw-r--r--pkgs/development/python-modules/yq/default.nix9
1 files changed, 5 insertions, 4 deletions
diff --git a/pkgs/development/python-modules/yq/default.nix b/pkgs/development/python-modules/yq/default.nix
index 05f608ff4e9ce..389cdbd26a0ac 100644
--- a/pkgs/development/python-modules/yq/default.nix
+++ b/pkgs/development/python-modules/yq/default.nix
@@ -10,7 +10,6 @@
 , flake8
 , jq
 , pytest
-, unixtools
 , toml
 }:
 
@@ -23,6 +22,10 @@ buildPythonPackage rec {
     sha256 = "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl";
   };
 
+  postPatch = ''
+    substituteInPlace test/test.py --replace "expect_exit_codes={0} if sys.stdin.isatty() else {2}" "expect_exit_codes={0}"
+  '';
+
   propagatedBuildInputs = [
     pyyaml
     xmltodict
@@ -32,7 +35,6 @@ buildPythonPackage rec {
   doCheck = true;
 
   checkInputs = [
-   unixtools.script
    pytest
    coverage
    flake8
@@ -40,8 +42,7 @@ buildPythonPackage rec {
    toml
   ];
 
-  # tests fails if stdin is not a tty
-  checkPhase = "echo | script -c 'pytest ./test/test.py'";
+  checkPhase = "pytest ./test/test.py";
 
   pythonImportsCheck = [ "yq" ];