mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-05 03:34:12 +00:00
python312Packages.pytest-testinfra: refactor
This commit is contained in:
parent
95c741d78a
commit
b3b595ae93
@ -1,28 +1,30 @@
|
||||
{
|
||||
lib,
|
||||
ansible-core,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
pythonOlder,
|
||||
setuptools-scm,
|
||||
ansible-core,
|
||||
paramiko,
|
||||
pytestCheckHook,
|
||||
pytest-xdist,
|
||||
pytestCheckHook,
|
||||
pythonOlder,
|
||||
pywinrm,
|
||||
salt,
|
||||
setuptools-scm,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pytest-testinfra";
|
||||
version = "10.1.0";
|
||||
format = "setuptools";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.9";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-93Qzm5R3Ws3zqMSjeTqOrS6N/HD/NLd4vhWquhQPoZ4=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ setuptools-scm ];
|
||||
build-system = [ setuptools-scm ];
|
||||
|
||||
nativeCheckInputs = [
|
||||
ansible-core
|
||||
@ -33,7 +35,7 @@ buildPythonPackage rec {
|
||||
salt
|
||||
];
|
||||
|
||||
# markers don't get added when docker is not available (leads to warnings):
|
||||
# Markers don't get added when docker is not available (leads to warnings):
|
||||
# https://github.com/pytest-dev/pytest-testinfra/blob/9.0.0/test/conftest.py#L223
|
||||
preCheck = ''
|
||||
export HOME=$(mktemp -d)
|
||||
@ -43,27 +45,25 @@ buildPythonPackage rec {
|
||||
\tskip_wsl: skip test on WSL, no systemd support' setup.cfg
|
||||
'';
|
||||
|
||||
# docker is required for all disabled tests
|
||||
disabledTests =
|
||||
[
|
||||
# test/test_backends.py
|
||||
"test_command"
|
||||
"test_encoding"
|
||||
"test_ansible_any_error_fatal"
|
||||
"test_user_connection"
|
||||
"test_sudo"
|
||||
"test_docker_encoding"
|
||||
]
|
||||
++ lib.optionals (pythonOlder "3.11") [
|
||||
# broken because salt package only built for python 3.11
|
||||
"test_backend_importables"
|
||||
];
|
||||
disabledTests = [
|
||||
# docker is required for all disabled tests
|
||||
# test/test_backends.py
|
||||
"test_command"
|
||||
"test_encoding"
|
||||
"test_ansible_any_error_fatal"
|
||||
"test_user_connection"
|
||||
"test_sudo"
|
||||
"test_docker_encoding"
|
||||
# Broken because salt package only built for Python
|
||||
"test_backend_importables"
|
||||
];
|
||||
|
||||
disabledTestPaths = [ "test/test_modules.py" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Pytest plugin for testing your infrastructure";
|
||||
homepage = "https://github.com/pytest-dev/pytest-testinfra";
|
||||
changelog = "https://github.com/pytest-dev/pytest-testinfra/releases/tag/${version}";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ hulr ];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user