python310Packages.wurlitzer: switch to pytestCheckHook
- add pythonImportsCheck - disable on unsupported Python releases
This commit is contained in:
parent
d49e9a0e6c
commit
6bca6e20f1
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue