1{ 2 lib, 3 buildPythonPackage, 4 factory-boy, 5 faker, 6 fetchFromGitHub, 7 importlib-metadata, 8 numpy, 9 pytest-xdist, 10 pytestCheckHook, 11 pythonOlder, 12 setuptools, 13}: 14 15buildPythonPackage rec { 16 pname = "pytest-randomly"; 17 version = "3.13.0"; 18 format = "pyproject"; 19 20 disabled = pythonOlder "3.8"; 21 22 src = fetchFromGitHub { 23 repo = "pytest-randomly"; 24 owner = "pytest-dev"; 25 rev = version; 26 hash = "sha256-bxbW22Nf/0hfJYSiz3xdrNCzrb7vZwuVvSIrWl0Bkv4="; 27 }; 28 29 nativeBuildInputs = [ setuptools ]; 30 31 propagatedBuildInputs = lib.optionals (pythonOlder "3.10") [ importlib-metadata ]; 32 33 nativeCheckInputs = [ 34 factory-boy 35 faker 36 numpy 37 pytest-xdist 38 pytestCheckHook 39 ]; 40 41 # needs special invocation, copied from tox.ini 42 pytestFlags = [ 43 "-pno:randomly" 44 ]; 45 46 pythonImportsCheck = [ "pytest_randomly" ]; 47 48 meta = with lib; { 49 changelog = "https://github.com/pytest-dev/pytest-randomly/blob/${version}/CHANGELOG.rst"; 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}