nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 factory-boy,
5 faker,
6 fetchFromGitHub,
7 model-bakery,
8 numpy,
9 pytest,
10 pytest-xdist,
11 pytestCheckHook,
12 setuptools,
13}:
14
15buildPythonPackage rec {
16 pname = "pytest-randomly";
17 version = "4.0.1";
18 pyproject = true;
19
20 src = fetchFromGitHub {
21 repo = "pytest-randomly";
22 owner = "pytest-dev";
23 tag = version;
24 hash = "sha256-UQ1G9o4dsVEEo4y2u1TYYurJPfih7QlbilkwPqi39H0=";
25 };
26
27 build-system = [ setuptools ];
28
29 buildInputs = [ pytest ];
30
31 nativeCheckInputs = [
32 factory-boy
33 faker
34 model-bakery
35 numpy
36 pytest-xdist
37 pytestCheckHook
38 ];
39
40 # needs special invocation, copied from tox.ini
41 pytestFlags = [
42 "-pno:randomly"
43 ];
44
45 pythonImportsCheck = [ "pytest_randomly" ];
46
47 meta = {
48 changelog = "https://github.com/pytest-dev/pytest-randomly/blob/${src.tag}/CHANGELOG.rst";
49 description = "Pytest plugin to randomly order tests and control random.seed";
50 homepage = "https://github.com/pytest-dev/pytest-randomly";
51 license = lib.licenses.mit;
52 maintainers = with lib.maintainers; [ sternenseemann ];
53 };
54}