depot/third_party/nixpkgs/pkgs/development/python-modules/pytest-randomly/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

56 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
factory-boy,
faker,
fetchFromGitHub,
importlib-metadata,
numpy,
pytest-xdist,
pytestCheckHook,
pythonOlder,
setuptools,
}:
buildPythonPackage rec {
pname = "pytest-randomly";
version = "3.13.0";
format = "pyproject";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
repo = pname;
owner = "pytest-dev";
rev = version;
hash = "sha256-bxbW22Nf/0hfJYSiz3xdrNCzrb7vZwuVvSIrWl0Bkv4=";
};
nativeBuildInputs = [ setuptools ];
propagatedBuildInputs = lib.optionals (pythonOlder "3.10") [ importlib-metadata ];
nativeCheckInputs = [
factory-boy
faker
numpy
pytest-xdist
pytestCheckHook
];
# needs special invocation, copied from tox.ini
pytestFlagsArray = [
"-p"
"no:randomly"
];
pythonImportsCheck = [ "pytest_randomly" ];
meta = with lib; {
changelog = "https://github.com/pytest-dev/pytest-randomly/blob/${version}/CHANGELOG.rst";
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 ];
};
}