Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: ae66698fa607
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6502a6748cdc
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Oct 16, 2020

  1. Revert "python3.pkgs.yq: make stdin a tty for tests"

    This reverts commit 40a58cc.
    veehaitch committed Oct 16, 2020
    Copy the full SHA
    5f6707d View commit details

Commits on Nov 14, 2020

  1. Merge pull request #100717 from veehaitch/fix-yq

    pythonPackages.yq: Fix tests
    marsam authored Nov 14, 2020
    Copy the full SHA
    6502a67 View commit details
Showing with 5 additions and 4 deletions.
  1. +5 −4 pkgs/development/python-modules/yq/default.nix
9 changes: 5 additions & 4 deletions pkgs/development/python-modules/yq/default.nix
Original file line number Diff line number Diff line change
@@ -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,16 +35,14 @@ buildPythonPackage rec {
doCheck = true;

checkInputs = [
unixtools.script
pytest
coverage
flake8
pkgs.jq
toml
];

# tests fails if stdin is not a tty
checkPhase = "echo | script -c 'pytest ./test/test.py'";
checkPhase = "pytest ./test/test.py";

pythonImportsCheck = [ "yq" ];