mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 07:05:13 +00:00
56 lines
1.0 KiB
Nix
56 lines
1.0 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, factory_boy
|
|
, faker
|
|
, fetchFromGitHub
|
|
, importlib-metadata
|
|
, numpy
|
|
, pytest-xdist
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pytest-randomly";
|
|
version = "3.10.3";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
src = fetchFromGitHub {
|
|
repo = pname;
|
|
owner = "pytest-dev";
|
|
rev = version;
|
|
sha256 = "sha256-NoYpMpFWz52Z0+KIUumUFp3xMPA1jGw8COojU+bsgHc=";
|
|
};
|
|
|
|
propagatedBuildInputs = lib.optionals (pythonOlder "3.10") [
|
|
importlib-metadata
|
|
];
|
|
|
|
checkInputs = [
|
|
factory_boy
|
|
faker
|
|
numpy
|
|
pytest-xdist
|
|
pytestCheckHook
|
|
];
|
|
|
|
# needs special invocation, copied from tox.ini
|
|
pytestFlagsArray = [
|
|
"-p"
|
|
"no:randomly"
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"pytest_randomly"
|
|
];
|
|
|
|
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 = with maintainers; [ sternenseemann ];
|
|
};
|
|
}
|