1{
2 lib,
3 ansible-core,
4 buildPythonPackage,
5 fetchPypi,
6 hatchling,
7 hatch-vcs,
8 paramiko,
9 pytest-xdist,
10 pytestCheckHook,
11 pythonOlder,
12 pywinrm,
13 salt,
14}:
15
16buildPythonPackage rec {
17 pname = "pytest-testinfra";
18 version = "10.2.2";
19 pyproject = true;
20
21 disabled = pythonOlder "3.9";
22
23 src = fetchPypi {
24 pname = "pytest_testinfra";
25 inherit version;
26 hash = "sha256-U3/V64jaYYwfRhJIqiBZTPjURRLoUZsjmDfoOHXh6c0=";
27 };
28
29 build-system = [
30 hatchling
31 hatch-vcs
32 ];
33
34 nativeCheckInputs = [
35 ansible-core
36 paramiko
37 pytestCheckHook
38 pytest-xdist
39 pywinrm
40 salt
41 ];
42
43 preCheck = ''
44 export HOME=$(mktemp -d)
45 '';
46
47 disabledTests = [
48 # docker is required for all disabled tests
49 # test/test_backends.py
50 "test_command"
51 "test_encoding"
52 "test_ansible_any_error_fatal"
53 "test_user_connection"
54 "test_sudo"
55 "test_docker_encoding"
56 # Broken because salt package only built for Python
57 "test_backend_importables"
58 ];
59
60 disabledTestPaths = [ "test/test_modules.py" ];
61
62 meta = with lib; {
63 description = "Pytest plugin for testing your infrastructure";
64 homepage = "https://github.com/pytest-dev/pytest-testinfra";
65 changelog = "https://github.com/pytest-dev/pytest-testinfra/releases/tag/${version}";
66 license = licenses.asl20;
67 maintainers = with maintainers; [ hulr ];
68 };
69}