2021-04-26 19:14:03 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder
|
|
|
|
, factory_boy, faker, numpy, backports-entry-points-selectable
|
|
|
|
, pytestCheckHook, pytest_xdist
|
2020-09-25 04:45:31 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytest-randomly";
|
2021-04-26 19:14:03 +00:00
|
|
|
version = "3.6.0";
|
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;
|
|
|
|
sha256 = "17s7gx8b7sl7mp77f5dxzwbb32qliz9awrp6xz58bhjqp7pcsa5h";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
backports-entry-points-selectable
|
|
|
|
];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
pytest_xdist
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|