1{ lib 2, buildPythonPackage 3, factory_boy 4, faker 5, fetchFromGitHub 6, importlib-metadata 7, numpy 8, pytest-xdist 9, pytestCheckHook 10, pythonOlder 11}: 12 13buildPythonPackage rec { 14 pname = "pytest-randomly"; 15 version = "3.12.0"; 16 format = "setuptools"; 17 18 disabled = pythonOlder "3.7"; 19 20 src = fetchFromGitHub { 21 repo = pname; 22 owner = "pytest-dev"; 23 rev = version; 24 hash = "sha256-n/Xp/HghqcQUreez+QbR3Mi5hE1U4zoOJCdFqD+pVBk="; 25 }; 26 27 propagatedBuildInputs = lib.optionals (pythonOlder "3.10") [ 28 importlib-metadata 29 ]; 30 31 checkInputs = [ 32 factory_boy 33 faker 34 numpy 35 pytest-xdist 36 pytestCheckHook 37 ]; 38 39 # needs special invocation, copied from tox.ini 40 pytestFlagsArray = [ 41 "-p" 42 "no:randomly" 43 ]; 44 45 pythonImportsCheck = [ 46 "pytest_randomly" 47 ]; 48 49 meta = with lib; { 50 description = "Pytest plugin to randomly order tests and control random.seed"; 51 homepage = "https://github.com/pytest-dev/pytest-randomly"; 52 license = licenses.mit; 53 maintainers = with maintainers; [ sternenseemann ]; 54 }; 55}