17
0

- update to 3.12.0:

* Support Python 3.11.
  * Drop Python 3.6 support.
  * Work on FIPS Python 3.9+, by declaring use of
    ``hashlib.md5()`` as not used for security.
  * Fix crash when pytest’s cacheprovider is disabled.
  * Improve group name in ``pytest --help``.
  * Fix new shuffling to work when one or more test in a class or
    module have the same test id.
  * Rework shuffling algorithm to use hashing. This means that
    running a subset of tests with the same seed will now produce
    the same ordering as running the full set of tests.
    This allows narrowing down ordering-related failures.
  * Add type hints.
  * Support Python 3.10.
- add fix-tests-pytest-73.patch to support pytest 7.3.x

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-randomly?expand=0&rev=26
This commit is contained in:
2023-05-05 00:07:02 +00:00
committed by Git OBS Bridge
parent ed8f2c172f
commit c6fc37b7e9
5 changed files with 123 additions and 15 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-pytest-randomly
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,25 +16,26 @@
#
%{?!python_module:%define python_module() python3-%{**}}
%{?sle15_python_module_pythons}
Name: python-pytest-randomly
Version: 3.7.0
Version: 3.12.0
Release: 0
Summary: Pytest plugin to randomly order tests and control random.seed
License: MIT
URL: https://github.com/pytest-dev/pytest-randomly
Source: https://github.com/pytest-dev/pytest-randomly/archive/%{version}.tar.gz#/pytest-randomly-%{version}.tar.gz
# PATCH-FIX-UPSTREAM: https://github.com/pytest-dev/pytest-randomly/commit/d663e203db254f7e310e4de0e4622e5596860698.patch
Patch1: fix-tests-pytest-73.patch
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-importlib-metadata >= 3.6.0
Requires: python-pytest
Recommends: python-Faker >= 4.1.0
Recommends: python-Faker >= 13.11.0
Suggests: python-numpy
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module Faker >= 4.1.0}
BuildRequires: %{python_module Faker >= 13.11.0}
BuildRequires: %{python_module factory_boy}
BuildRequires: %{python_module importlib-metadata >= 3.6.0}
BuildRequires: %{python_module pytest-xdist}
@@ -64,7 +65,7 @@ Features:
every test.
%prep
%setup -q -n pytest-randomly-%{version}
%autosetup -p1 -n pytest-randomly-%{version}
%build
%python_build
@@ -75,16 +76,12 @@ Features:
%check
# test_entrypoint_injection needs installed module for pytest to use
donttest="test_entrypoint_injection"
# no python36-numpy
python36_donttest="or test_numpy"
%pytest -k "not ($donttest ${$python_donttest})"
%pytest -k "not (test_entrypoint_injection or test_it_runs_before_stepwise)"
%files %{python_files}
%doc README.rst
%license LICENSE
%{python_sitelib}/pytest_randomly.py*
%pycache_only %{python_sitelib}/__pycache__/pytest_randomly*.pyc
%{python_sitelib}/pytest_randomly
%{python_sitelib}/pytest_randomly-%{version}*-info
%changelog