From 5704642a3f8dd29ef6e280de69171186ca327b6a Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Wed, 8 Aug 2018 15:25:40 -0400 Subject: [PATCH] pythonPackages.pytest-faulthandler: init at 1.5.0 - compatible with 2.7 and 3+ - all test pass. --- .../pytest-faulthandler/default.nix | 34 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/development/python-modules/pytest-faulthandler/default.nix diff --git a/pkgs/development/python-modules/pytest-faulthandler/default.nix b/pkgs/development/python-modules/pytest-faulthandler/default.nix new file mode 100644 index 000000000000..852de1fd49cd --- /dev/null +++ b/pkgs/development/python-modules/pytest-faulthandler/default.nix @@ -0,0 +1,34 @@ +{ lib +, buildPythonPackage +, fetchPypi +, setuptools_scm +, pytest +, pytest-mock +, pythonOlder +, faulthandler +}: + +buildPythonPackage rec { + pname = "pytest-faulthandler"; + version = "1.5.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "bf8634c3fd6309ef786ec03b913a5366163fdb094ebcfdebc35626400d790e0d"; + }; + + buildInputs = [ setuptools_scm pytest ]; + checkInputs = [ pytest-mock ]; + propagatedBuildInputs = lib.optional (pythonOlder "3.0") faulthandler; + + checkPhase = '' + py.test + ''; + + meta = { + description = "Py.test plugin that activates the fault handler module for tests"; + homepage = https://github.com/pytest-dev/pytest-faulthandler; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ costrouc ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index eb58f67c5970..267d283cbb90 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1885,6 +1885,8 @@ in { pytest-django = callPackage ../development/python-modules/pytest-django { }; + pytest-faulthandler = callPackage ../development/python-modules/pytest-faulthandler { }; + pytest-fixture-config = callPackage ../development/python-modules/pytest-fixture-config { }; pytest-forked = callPackage ../development/python-modules/pytest-forked { };