python310Packages.wurlitzer: switch to pytestCheckHook

- add pythonImportsCheck
- disable on unsupported Python releases
This commit is contained in:
Fabian Affolter 2022-12-09 10:46:03 +01:00 committed by GitHub
parent d49e9a0e6c
commit 6bca6e20f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,28 +1,33 @@
{ lib
, buildPythonPackage
, fetchPypi
, isPy27
, mock
, pytest
, selectors2
, pythonOlder
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "wurlitzer";
version = "3.0.3";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-Ik9f5wYYvjhywF393IxFcZHsGHBlRZYnn8we2t6+Pls=";
};
propagatedBuildInputs = lib.optionals isPy27 [ selectors2 ];
checkInputs = [
pytestCheckHook
];
checkInputs = [ mock pytest ];
pythonImportsCheck = [
"wurlitzer"
];
checkPhase = ''
py.test test.py
'';
pytestFlagsArray = [
"test.py"
];
meta = with lib; {
description = "Capture C-level output in context managers";