1{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder 2, factory_boy, faker, numpy, importlib-metadata 3, pytestCheckHook, pytest-xdist 4}: 5 6buildPythonPackage rec { 7 pname = "pytest-randomly"; 8 version = "3.10.1"; 9 10 disabled = pythonOlder "3.6"; 11 12 # fetch from GitHub as pypi tarball doesn't include tests 13 src = fetchFromGitHub { 14 repo = pname; 15 owner = "pytest-dev"; 16 rev = version; 17 sha256 = "10z7hsr8yd80sf5113i61p0g1c0nqkx7p4xi19v3d133f6vjbh3k"; 18 }; 19 20 propagatedBuildInputs = lib.optionals (pythonOlder "3.10") [ 21 importlib-metadata 22 ]; 23 24 checkInputs = [ 25 pytestCheckHook 26 pytest-xdist 27 numpy 28 factory_boy 29 faker 30 ]; 31 # needs special invocation, copied from tox.ini 32 pytestFlagsArray = [ "-p" "no:randomly" ]; 33 34 meta = with lib; { 35 description = "Pytest plugin to randomly order tests and control random.seed"; 36 homepage = "https://github.com/pytest-dev/pytest-randomly"; 37 license = licenses.bsd3; 38 maintainers = [ maintainers.sternenseemann ]; 39 }; 40}