From c2c5defbbf59d1adc38115e9c2dab8cdafb8300a Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 30 Dec 2022 22:41:01 +0100 Subject: [PATCH] python3Packages.pytest-shutil: Disable failing test and reformat and use a more recent formatting. --- .../python-modules/pytest-shutil/default.nix | 57 +++++++++++++++---- 1 file changed, 47 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/pytest-shutil/default.nix b/pkgs/development/python-modules/pytest-shutil/default.nix index e3b2277fa99b..64b0ff0c1d0d 100644 --- a/pkgs/development/python-modules/pytest-shutil/default.nix +++ b/pkgs/development/python-modules/pytest-shutil/default.nix @@ -1,14 +1,33 @@ -{ lib, isPyPy, buildPythonPackage, fetchPypi -, pytest, cmdline, pytest-cov, coverage, setuptools-git, mock, path, execnet -, contextlib2, termcolor, six }: +{ lib +, isPyPy +, buildPythonPackage +, fetchPypi + +# build +, pytest + +# runtime +, setuptools-git +, mock +, path +, execnet +, contextlib2 +, termcolor +, six + +# tests +, cmdline +, pytestCheckHook + }: buildPythonPackage rec { pname = "pytest-shutil"; version = "1.7.0"; + format = "setuptools"; src = fetchPypi { inherit pname version; - sha256 = "0q8j0ayzmnvlraml6i977ybdq4xi096djhf30n2m1rvnvrhm45nq"; + hash = "sha256-2BZSYd5251CFBcNB2UwCsRPclj8nRUOrynTb+r0CEmE="; }; postPatch = '' @@ -16,13 +35,31 @@ buildPythonPackage rec { --replace "path.py" "path" ''; - buildInputs = [ pytest ]; - checkInputs = [ cmdline pytest ]; - propagatedBuildInputs = [ pytest-cov coverage setuptools-git mock path execnet contextlib2 termcolor six ]; + buildInputs = [ + pytest + ]; - checkPhase = '' - py.test ${lib.optionalString isPyPy "-k'not (test_run or test_run_integration)'"} - ''; + propagatedBuildInputs = [ + setuptools-git + mock + path + execnet + contextlib2 + termcolor + six + ]; + + checkInputs = [ + cmdline + pytestCheckHook + ]; + + disabledTests = [ + "test_pretty_formatter" + ] ++ lib.optionals isPyPy [ + "test_run" + "test_run_integration" + ]; meta = with lib; { description = "A goodie-bag of unix shell and environment tools for py.test";