python310Packages.pytest-datafiles: enable tests

- add pythonImportsCheck
- disable on older Python releases
This commit is contained in:
Fabian Affolter 2022-05-02 16:13:10 +02:00 committed by Jonathan Ringer
parent d5de6ac75e
commit 88d84fa655

View File

@ -1,18 +1,43 @@
{ lib, buildPythonPackage, fetchPypi, py, pytest }:
{ lib
, buildPythonPackage
, fetchFromGitHub
, py
, pytest
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "pytest-datafiles";
version = "2.0.1";
src = fetchPypi {
inherit version pname;
sha256 = "sha256-b2VY0qbny95xT2JBHOhOXALM0ZW9elAmO/3YiL5KFUQ=";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "omarkohl";
repo = pname;
rev = version;
sha256 = "sha256-M0Lnsqi05Xs0uN6LlafNS7HJZOut+nrMZyvGPMMhIkc=";
};
buildInputs = [ py pytest ];
buildInputs = [
py
pytest
];
checkInputs = [
pytestCheckHook
];
pythonImportsCheck = [
"pytest_datafiles"
];
meta = with lib; {
license = licenses.mit;
description = "Pytest plugin to create a tmpdir containing predefined files/directories";
homepage = "https://github.com/omarkohl/pytest-datafiles";
description = "py.test plugin to create a 'tmpdir' containing predefined files/directories.";
license = licenses.mit;
maintainers = with maintainers; [ ];
};
}