2022-01-13 20:06:32 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, factory_boy
|
|
|
|
, faker
|
|
|
|
, fetchFromGitHub
|
|
|
|
, importlib-metadata
|
|
|
|
, numpy
|
|
|
|
, pytest-xdist
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2020-09-25 04:45:31 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytest-randomly";
|
2022-06-26 10:26:21 +00:00
|
|
|
version = "3.12.0";
|
2022-01-13 20:06:32 +00:00
|
|
|
format = "setuptools";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
repo = pname;
|
|
|
|
owner = "pytest-dev";
|
|
|
|
rev = version;
|
2022-06-26 10:26:21 +00:00
|
|
|
hash = "sha256-n/Xp/HghqcQUreez+QbR3Mi5hE1U4zoOJCdFqD+pVBk=";
|
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 = [
|
|
|
|
factory_boy
|
|
|
|
faker
|
2022-01-13 20:06:32 +00:00
|
|
|
numpy
|
|
|
|
pytest-xdist
|
|
|
|
pytestCheckHook
|
2021-04-26 19:14:03 +00:00
|
|
|
];
|
2022-01-13 20:06:32 +00:00
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
# needs special invocation, copied from tox.ini
|
2022-01-13 20:06:32 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"-p"
|
|
|
|
"no:randomly"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"pytest_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";
|
2022-02-10 20:34:41 +00:00
|
|
|
license = licenses.mit;
|
2022-01-13 20:06:32 +00:00
|
|
|
maintainers = with maintainers; [ sternenseemann ];
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
}
|