forked from pool/python-pytest-testinfra
- Add patch support-python-313.patch:
* Do not use crypt for testing. - Switch to pyproject macros. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-testinfra?expand=0&rev=18
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Dec 4 06:04:30 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Add patch support-python-313.patch:
|
||||||
|
* Do not use crypt for testing.
|
||||||
|
- Switch to pyproject macros.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Jun 7 07:02:49 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
Fri Jun 7 07:02:49 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
|||||||
@@ -22,17 +22,20 @@ Version: 10.1.1
|
|||||||
Release: 0
|
Release: 0
|
||||||
Summary: Python module to test infrastructures
|
Summary: Python module to test infrastructures
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
Group: Development/Languages/Python
|
|
||||||
URL: https://github.com/pytest-dev/pytest-testinfra
|
URL: https://github.com/pytest-dev/pytest-testinfra
|
||||||
Source: https://files.pythonhosted.org/packages/source/p/pytest-testinfra/pytest-testinfra-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/p/pytest-testinfra/pytest-testinfra-%{version}.tar.gz
|
||||||
# PATCH-FIX-OPENSUSE testinfra-parametrize-backends-test.patch -- make backends deselectable which are not available for testing
|
# PATCH-FIX-OPENSUSE testinfra-parametrize-backends-test.patch -- make backends deselectable which are not available for testing
|
||||||
Patch1: testinfra-parametrize-backends-test.patch
|
Patch0: testinfra-parametrize-backends-test.patch
|
||||||
|
# PATCH-FIX-UPSTREAM gh#pytest-dev/pytest-testinfra#764
|
||||||
|
Patch1: support-python-313.patch
|
||||||
BuildRequires: %{python_module paramiko}
|
BuildRequires: %{python_module paramiko}
|
||||||
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module pywinrm}
|
BuildRequires: %{python_module pywinrm}
|
||||||
BuildRequires: %{python_module setuptools_scm}
|
BuildRequires: %{python_module setuptools_scm}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: %{python_module tornado}
|
BuildRequires: %{python_module tornado}
|
||||||
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: ansible
|
BuildRequires: ansible
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
@@ -59,10 +62,10 @@ sed -i -e '/\[tool:pytest\]/ a markers = \
|
|||||||
destructive' setup.cfg
|
destructive' setup.cfg
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%pyproject_wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%python_install
|
%pyproject_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}/testinfra
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}/testinfra
|
||||||
|
|
||||||
%check
|
%check
|
||||||
@@ -79,6 +82,6 @@ fi
|
|||||||
%doc CHANGELOG.rst README.rst
|
%doc CHANGELOG.rst README.rst
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%{python_sitelib}/testinfra
|
%{python_sitelib}/testinfra
|
||||||
%{python_sitelib}/pytest_testinfra-%{version}*-info
|
%{python_sitelib}/pytest_testinfra-%{version}.dist-info
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
|||||||
31
support-python-313.patch
Normal file
31
support-python-313.patch
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
From 20ef83970b24cd53ce7f5bf952360d8b99a0b7de Mon Sep 17 00:00:00 2001
|
||||||
|
From: Martin Hoyer <mhoyer@redhat.com>
|
||||||
|
Date: Tue, 7 May 2024 15:55:07 +0200
|
||||||
|
Subject: [PATCH] Remove crypt lib from testing
|
||||||
|
|
||||||
|
---
|
||||||
|
test/test_modules.py | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/test/test_modules.py b/test/test_modules.py
|
||||||
|
index 23a1f2f2..15416344 100644
|
||||||
|
--- a/test/test_modules.py
|
||||||
|
+++ b/test/test_modules.py
|
||||||
|
@@ -10,7 +10,6 @@
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
-import crypt
|
||||||
|
import datetime
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
@@ -257,7 +256,8 @@ def test_nonexistent_user(host):
|
||||||
|
def test_current_user(host):
|
||||||
|
assert host.user().name == "root"
|
||||||
|
pw = host.user().password
|
||||||
|
- assert crypt.crypt("foo", pw) == pw
|
||||||
|
+ assert pw.startswith("$")
|
||||||
|
+ assert len(pw) == 73
|
||||||
|
|
||||||
|
|
||||||
|
def test_group(host):
|
||||||
Reference in New Issue
Block a user