From 1983e27ac9aff5ec66a70a4a6e9f86f57574210e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 10 Feb 2021 08:54:36 +0100 Subject: [PATCH] python3Packages.pyfakefs: switch to pytestCheckHook --- .../python-modules/pyfakefs/default.nix | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/pyfakefs/default.nix b/pkgs/development/python-modules/pyfakefs/default.nix index 49c35507c7fb..8fac00e871e1 100644 --- a/pkgs/development/python-modules/pyfakefs/default.nix +++ b/pkgs/development/python-modules/pyfakefs/default.nix @@ -1,4 +1,10 @@ -{ lib, stdenv, buildPythonPackage, fetchPypi, pythonOlder, python, pytest, glibcLocales }: +{ lib +, stdenv +, buildPythonPackage +, fetchPypi +, pytestCheckHook +, pythonOlder +}: buildPythonPackage rec { version = "4.3.3"; @@ -25,20 +31,16 @@ buildPythonPackage rec { --replace "test_rename_dir_to_existing_dir" "notest_rename_dir_to_existing_dir" ''); - checkInputs = [ pytest glibcLocales ]; - - checkPhase = '' - export LC_ALL=en_US.UTF-8 - ${python.interpreter} -m pyfakefs.tests.all_tests - ${python.interpreter} -m pyfakefs.tests.all_tests_without_extra_packages - ${python.interpreter} -m pytest pyfakefs/pytest_tests/pytest_plugin_test.py - ''; + checkInputs = [ pytestCheckHook ]; + # https://github.com/jmcgeheeiv/pyfakefs/issues/581 (OSError: [Errno 9] Bad file descriptor) + disabledTests = [ "test_open_existing_pipe" ]; + pythonImportsCheck = [ "pyfakefs" ]; meta = with lib; { description = "Fake file system that mocks the Python file system modules"; - license = licenses.asl20; - homepage = "http://pyfakefs.org/"; - changelog = "https://github.com/jmcgeheeiv/pyfakefs/blob/master/CHANGES.md"; + homepage = "http://pyfakefs.org/"; + changelog = "https://github.com/jmcgeheeiv/pyfakefs/blob/master/CHANGES.md"; + license = licenses.asl20; maintainers = with maintainers; [ gebner ]; }; }