15
0

- Update to 0.9.0:

- Drop support for Python 2.X, 3.5, and 3.6;
    Add support for Python 3.10, 3.11
  - Modernize from setup.py -> pyproject.toml
  - Add ``namespace`` argument to ``@parameterize.expand``
  - Add support for ``IsolatedAsyncioTestCase``
  - Work around for bug bpo-40126 in older versions of ``mock``
  - Allow str, bytes, and any non-iterable input to be passed to
    ``@parameterized`` without wrapping in a tuple
  - Fix class-level ``mock.patch.multiple``

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-parameterized?expand=0&rev=31
This commit is contained in:
2023-05-10 07:32:40 +00:00
committed by Git OBS Bridge
parent d9f94a8571
commit 0483396934
6 changed files with 63 additions and 586 deletions

View File

@@ -24,22 +24,20 @@
%bcond_without nose2
%endif
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%{?sle15_python_module_pythons}
Name: python-parameterized
Version: 0.8.1
Version: 0.9.0
Release: 0
Summary: Parameterized testing
License: BSD-2-Clause
URL: https://github.com/wolever/parameterized
Source: https://files.pythonhosted.org/packages/source/p/parameterized/parameterized-%{version}.tar.gz
# PATCH-FIX-UPSTREAM parameterized-pr116-pytest4.patch -- gh#wolever/parameterized#116, fix pytest >= 4 execution
Patch0: parameterized-pr116-pytest4.patch
# PATCH-FIX-OPENSUSE remove_nose.patch mcepl@suse.com
# Remove nose dependency (patch is not very good, DO NOT SEND UPSTREAM!)
Patch1: remove_nose.patch
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
%if %{with nose2}
BuildRequires: %{python_module nose2}
%endif
@@ -52,14 +50,13 @@ BuildArch: noarch
Parameterized testing with any Python test framework.
%prep
%setup -q -n parameterized-%{version}
%autopatch -p1
%autosetup -p1 -n parameterized-%{version}
%build
%python_build
%pyproject_wheel
%install
%python_install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
@@ -70,8 +67,9 @@ export LANG=en_US.UTF8
%{python_expand nose2-%$python_version -v -B --pretty-assert}
%endif
%python_exec -m unittest parameterized.test
# https://github.com/wolever/parameterized/issues/122
%pytest parameterized/test.py -k 'not (test_with_docstring_1_v_l_ or test_with_docstring_0_value1)'
# gh#wolever/parameterized#122
skip_tests="test_with_docstring_1_v_l_ or test_with_docstring_0_value1"
%pytest parameterized/test.py -k "not ($skip_tests)"
%files %{python_files}
%doc CHANGELOG.txt README.rst