2021-04-26 19:14:03 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder
|
2021-09-18 10:52:07 +00:00
|
|
|
, factory_boy, faker, numpy, importlib-metadata
|
2021-07-24 12:14:16 +00:00
|
|
|
, pytestCheckHook, pytest-xdist
|
2020-09-25 04:45:31 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytest-randomly";
|
2021-09-18 10:52:07 +00:00
|
|
|
version = "3.10.1";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
# fetch from GitHub as pypi tarball doesn't include tests
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
repo = pname;
|
|
|
|
owner = "pytest-dev";
|
|
|
|
rev = version;
|
2021-09-18 10:52:07 +00:00
|
|
|
sha256 = "10z7hsr8yd80sf5113i61p0g1c0nqkx7p4xi19v3d133f6vjbh3k";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
propagatedBuildInputs = lib.optionals (pythonOlder "3.10") [
|
|
|
|
importlib-metadata
|
2021-04-26 19:14:03 +00:00
|
|
|
];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
2021-07-24 12:14:16 +00:00
|
|
|
pytest-xdist
|
2021-04-26 19:14:03 +00:00
|
|
|
numpy
|
|
|
|
factory_boy
|
|
|
|
faker
|
|
|
|
];
|
|
|
|
# needs special invocation, copied from tox.ini
|
|
|
|
pytestFlagsArray = [ "-p" "no:randomly" ];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Pytest plugin to randomly order tests and control random.seed";
|
|
|
|
homepage = "https://github.com/pytest-dev/pytest-randomly";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.sternenseemann ];
|
|
|
|
};
|
|
|
|
}
|