forked from pool/python-pytest-verbose-parametrize
- Update to 1.8.0:
* Drop support for Python 2 and <3.6, removing compatibility code. * Use stdlib unittest.mock instead of mock package. * Removed usage of path.py and path in favour of pathlib. - Removed patches, included upstream: * Iterable-collections.patch * pytest-fixtures-pr171-remove-mock.patch - Refreshed python-pytest-verbose-parametrize-no-six.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-verbose-parametrize?expand=0&rev=14
This commit is contained in:
@@ -1,17 +0,0 @@
|
|||||||
---
|
|
||||||
pytest_verbose_parametrize.py | 5 ++++-
|
|
||||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
--- a/pytest_verbose_parametrize.py
|
|
||||||
+++ b/pytest_verbose_parametrize.py
|
|
||||||
@@ -1,4 +1,9 @@
|
|
||||||
-from collections import Iterable
|
|
||||||
+try:
|
|
||||||
+ from collections.abc import Iterable
|
|
||||||
+except ImportError:
|
|
||||||
+ from collections import Iterable
|
|
||||||
+except ModuleNotFoundError:
|
|
||||||
+ from collections import Iterable
|
|
||||||
from six import string_types, text_type
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
diff --git a/pytest-verbose-parametrize/tests/unit/test_verbose_parametrize.py b/pytest-verbose-parametrize/tests/unit/test_verbose_parametrize.py
|
|
||||||
index fcce01d..bba9aa6 100644
|
|
||||||
--- pytest-verbose-parametrize/tests/unit/test_verbose_parametrize.py
|
|
||||||
+++ pytest-verbose-parametrize.patched/tests/unit/test_verbose_parametrize.py
|
|
||||||
@@ -1,5 +1,8 @@
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
-from mock import Mock
|
|
||||||
+try:
|
|
||||||
+ from unittest.mock import Mock
|
|
||||||
+except ImportError:
|
|
||||||
+ from mock import Mock
|
|
||||||
|
|
||||||
from pytest_verbose_parametrize import pytest_generate_tests
|
|
||||||
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:b85b374a5747607a8e9ffca9732e152859b8e7115bcb10f25c31c60d403146e8
|
|
||||||
size 12301
|
|
||||||
3
pytest-verbose-parametrize-1.8.0.tar.gz
Normal file
3
pytest-verbose-parametrize-1.8.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:05dfd556c446159c366b88e196676321f48a6d92ad6465bae69758dd603db0a5
|
||||||
|
size 30768
|
||||||
@@ -1,11 +1,9 @@
|
|||||||
Index: pytest-verbose-parametrize-1.7.0/pytest_verbose_parametrize.py
|
Index: pytest-verbose-parametrize-1.8.0/pytest_verbose_parametrize.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- pytest-verbose-parametrize-1.7.0.orig/pytest_verbose_parametrize.py
|
--- pytest-verbose-parametrize-1.8.0.orig/pytest_verbose_parametrize.py
|
||||||
+++ pytest-verbose-parametrize-1.7.0/pytest_verbose_parametrize.py
|
+++ pytest-verbose-parametrize-1.8.0/pytest_verbose_parametrize.py
|
||||||
@@ -4,14 +4,13 @@ except ImportError:
|
@@ -1,12 +1,11 @@
|
||||||
from collections import Iterable
|
from collections.abc import Iterable
|
||||||
except ModuleNotFoundError:
|
|
||||||
from collections import Iterable
|
|
||||||
-from six import string_types, text_type
|
-from six import string_types, text_type
|
||||||
|
|
||||||
|
|
||||||
@@ -18,7 +16,7 @@ Index: pytest-verbose-parametrize-1.7.0/pytest_verbose_parametrize.py
|
|||||||
if len(s) > 32:
|
if len(s) > 32:
|
||||||
s = s[:29] + '...'
|
s = s[:29] + '...'
|
||||||
return s
|
return s
|
||||||
@@ -34,7 +33,7 @@ def pytest_generate_tests(metafunc):
|
@@ -29,7 +28,7 @@ def pytest_generate_tests(metafunc):
|
||||||
if 'ids' not in markers.kwargs:
|
if 'ids' not in markers.kwargs:
|
||||||
list_names = []
|
list_names = []
|
||||||
for i, argvalue in enumerate(markers.args[1]):
|
for i, argvalue in enumerate(markers.args[1]):
|
||||||
@@ -27,3 +25,15 @@ Index: pytest-verbose-parametrize-1.7.0/pytest_verbose_parametrize.py
|
|||||||
argvalue = (argvalue,)
|
argvalue = (argvalue,)
|
||||||
name = '-'.join(_strize_arg(arg) for arg in argvalue)
|
name = '-'.join(_strize_arg(arg) for arg in argvalue)
|
||||||
if len(name) > 64:
|
if len(name) > 64:
|
||||||
|
Index: pytest-verbose-parametrize-1.8.0/setup.py
|
||||||
|
===================================================================
|
||||||
|
--- pytest-verbose-parametrize-1.8.0.orig/setup.py
|
||||||
|
+++ pytest-verbose-parametrize-1.8.0/setup.py
|
||||||
|
@@ -18,7 +18,6 @@ classifiers = [
|
||||||
|
]
|
||||||
|
|
||||||
|
install_requires = ['pytest',
|
||||||
|
- 'six',
|
||||||
|
]
|
||||||
|
|
||||||
|
tests_require = ['mock; python_version<"3.3"',
|
||||||
|
|||||||
@@ -1,3 +1,15 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Oct 22 06:08:51 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Update to 1.8.0:
|
||||||
|
* Drop support for Python 2 and <3.6, removing compatibility code.
|
||||||
|
* Use stdlib unittest.mock instead of mock package.
|
||||||
|
* Removed usage of path.py and path in favour of pathlib.
|
||||||
|
- Removed patches, included upstream:
|
||||||
|
* Iterable-collections.patch
|
||||||
|
* pytest-fixtures-pr171-remove-mock.patch
|
||||||
|
- Refreshed python-pytest-verbose-parametrize-no-six.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Dec 8 13:18:34 UTC 2022 - pgajdos@suse.com
|
Thu Dec 8 13:18:34 UTC 2022 - pgajdos@suse.com
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-pytest-verbose-parametrize
|
# spec file for package python-pytest-verbose-parametrize
|
||||||
#
|
#
|
||||||
# Copyright (c) 2022 SUSE LLC
|
# Copyright (c) 2024 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -16,25 +16,19 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
||||||
%bcond_without python2
|
|
||||||
Name: python-pytest-verbose-parametrize
|
Name: python-pytest-verbose-parametrize
|
||||||
Version: 1.7.0
|
Version: 1.8.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: More descriptive output for parametrized pytest tests
|
Summary: More descriptive output for parametrized pytest tests
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/manahl/pytest-plugins
|
URL: https://github.com/man-group/pytest-plugins
|
||||||
Source: https://files.pythonhosted.org/packages/source/p/pytest-verbose-parametrize/pytest-verbose-parametrize-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/p/pytest-verbose-parametrize/pytest-verbose-parametrize-%{version}.tar.gz
|
||||||
# PATCH-FIX-UPSTREAM Iterable-collections.patch gh#man-group/pytest-plugins#197 mcepl@suse.com
|
|
||||||
# Python 3.10 finally really killed collections class, which are now in
|
|
||||||
# collections.abc
|
|
||||||
Patch0: Iterable-collections.patch
|
|
||||||
# PATCH-FEATURE-UPSTREAM pytest-fixtures-pr171-remove-mock.patch -- gh#man-group#pytest-plugins#171
|
|
||||||
Patch1: pytest-fixtures-pr171-remove-mock.patch
|
|
||||||
# https://github.com/man-group/pytest-plugins/issues/209
|
# https://github.com/man-group/pytest-plugins/issues/209
|
||||||
Patch2: python-pytest-verbose-parametrize-no-six.patch
|
Patch0: python-pytest-verbose-parametrize-no-six.patch
|
||||||
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module setuptools-git}
|
BuildRequires: %{python_module setuptools-git}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires: python-pytest
|
Requires: python-pytest
|
||||||
@@ -43,37 +37,30 @@ BuildArch: noarch
|
|||||||
BuildRequires: %{python_module coverage}
|
BuildRequires: %{python_module coverage}
|
||||||
BuildRequires: %{python_module pytest-virtualenv}
|
BuildRequires: %{python_module pytest-virtualenv}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
%if %{with python2}
|
|
||||||
BuildRequires: python2-mock
|
|
||||||
%endif
|
|
||||||
# /SECTION
|
# /SECTION
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
More descriptive output for parametrized py.test tests.
|
More descriptive output for parametrized pytest tests.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1 -n pytest-verbose-parametrize-%{version}
|
%autosetup -p1 -n pytest-verbose-parametrize-%{version}
|
||||||
|
|
||||||
# we can't do integration tests as py2 and py3 can be different versions
|
|
||||||
# and the script simply calls $bindir/pytest
|
|
||||||
rm tests/integration/test_verbose_parametrize.py
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%pyproject_wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%python_install
|
%pyproject_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%pytest
|
%pytest --ignore tests/integration/test_verbose_parametrize.py
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%doc CHANGES.md README.md
|
%doc CHANGES.md README.md
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%{python_sitelib}/pytest_verbose_parametrize.py*
|
%{python_sitelib}/pytest_verbose_parametrize.py
|
||||||
%pycache_only %{python_sitelib}/__pycache__/pytest_verbose_parametrize*.pyc
|
%pycache_only %{python_sitelib}/__pycache__/pytest_verbose_parametrize*.pyc
|
||||||
%{python_sitelib}/pytest_verbose_parametrize-%{version}*-info
|
%{python_sitelib}/pytest_verbose_parametrize-%{version}.dist-info
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
|||||||
Reference in New Issue
Block a user