depot/third_party/nixpkgs/pkgs/development/python-modules/pytest-randomly/default.nix
Default email 81047829ea Project import generated by Copybara.
GitOrigin-RevId: 48d63e924a2666baf37f4f14a18f19347fbd54a2
2022-02-10 15:34:41 -05:00

55 lines
1 KiB
Nix

{ lib
, buildPythonPackage
, factory_boy
, faker
, fetchFromGitHub
, importlib-metadata
, numpy
, pytest-xdist
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "pytest-randomly";
version = "3.11.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
repo = pname;
owner = "pytest-dev";
rev = version;
hash = "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.mit;
maintainers = with maintainers; [ sternenseemann ];
};
}