2019-01-31 19:06:00 +01:00
|
|
|
#
|
|
|
|
# spec file for package python-pytest-randomly
|
|
|
|
#
|
2023-05-05 02:07:02 +02:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2019-01-31 19:06:00 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2023-04-24 11:15:22 +02:00
|
|
|
%{?sle15_python_module_pythons}
|
2019-01-31 19:06:00 +01:00
|
|
|
Name: python-pytest-randomly
|
2023-11-07 21:05:14 +01:00
|
|
|
Version: 3.15.0
|
2019-01-31 19:06:00 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Pytest plugin to randomly order tests and control random.seed
|
2021-04-19 06:42:51 +02:00
|
|
|
License: MIT
|
2020-02-20 08:15:17 +01:00
|
|
|
URL: https://github.com/pytest-dev/pytest-randomly
|
2021-04-19 06:42:51 +02:00
|
|
|
Source: https://github.com/pytest-dev/pytest-randomly/archive/%{version}.tar.gz#/pytest-randomly-%{version}.tar.gz
|
2023-07-24 21:54:33 +02:00
|
|
|
BuildRequires: %{python_module pip}
|
|
|
|
BuildRequires: %{python_module wheel}
|
2019-01-31 19:06:00 +01:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2021-04-19 06:42:51 +02:00
|
|
|
Requires: python-importlib-metadata >= 3.6.0
|
2019-01-31 19:06:00 +01:00
|
|
|
Requires: python-pytest
|
2023-05-05 02:07:02 +02:00
|
|
|
Recommends: python-Faker >= 13.11.0
|
2019-03-26 21:19:27 +01:00
|
|
|
Suggests: python-numpy
|
2019-01-31 19:06:00 +01:00
|
|
|
BuildArch: noarch
|
|
|
|
# SECTION test requirements
|
2023-05-05 02:07:02 +02:00
|
|
|
BuildRequires: %{python_module Faker >= 13.11.0}
|
2019-02-14 16:24:18 +01:00
|
|
|
BuildRequires: %{python_module factory_boy}
|
2021-04-19 06:42:51 +02:00
|
|
|
BuildRequires: %{python_module importlib-metadata >= 3.6.0}
|
2023-11-07 21:05:14 +01:00
|
|
|
BuildRequires: %{python_module model-bakery >= 1.13.0}
|
|
|
|
BuildRequires: %{python_module numpy}
|
2020-04-27 11:48:29 +02:00
|
|
|
BuildRequires: %{python_module pytest-xdist}
|
2019-01-31 19:06:00 +01:00
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
# /SECTION
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
|
|
|
Pytest plugin to randomly order tests and control random.seed.
|
|
|
|
|
|
|
|
Features:
|
|
|
|
* Randomly shuffles the order of test items. This is done first at
|
|
|
|
the level of modules, then at the level of test classes (if you
|
|
|
|
have them), then at the order of functions. This also works with
|
|
|
|
things like doctests.
|
2019-02-14 16:24:18 +01:00
|
|
|
* Resets random.seed() at the start of every test case and test to
|
2019-01-31 19:06:00 +01:00
|
|
|
fixed number - this defaults to time.time() from the start of
|
|
|
|
your test run, but you can pass in --randomly-seed to repeat a
|
|
|
|
randomness-induced failure.
|
|
|
|
* If factory boy is installed, its random state is reset at the
|
|
|
|
start of every test. This allows for repeatable use of its random
|
|
|
|
'fuzzy' features.
|
|
|
|
* If faker is installed, its random state is reset at the start of
|
|
|
|
every test. This is also for repeatable fuzzy data in tests.
|
|
|
|
* If numpy is installed, its random state is reset at the start of
|
|
|
|
every test.
|
|
|
|
|
|
|
|
%prep
|
2023-05-05 02:07:02 +02:00
|
|
|
%autosetup -p1 -n pytest-randomly-%{version}
|
2019-01-31 19:06:00 +01:00
|
|
|
|
|
|
|
%build
|
2023-07-24 21:54:33 +02:00
|
|
|
%pyproject_wheel
|
2019-01-31 19:06:00 +01:00
|
|
|
|
|
|
|
%install
|
2023-07-24 21:54:33 +02:00
|
|
|
%pyproject_install
|
2019-01-31 19:06:00 +01:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
2019-02-14 16:24:18 +01:00
|
|
|
%check
|
2019-09-09 16:08:46 +02:00
|
|
|
# test_entrypoint_injection needs installed module for pytest to use
|
2023-05-05 02:07:02 +02:00
|
|
|
%pytest -k "not (test_entrypoint_injection or test_it_runs_before_stepwise)"
|
2019-01-31 19:06:00 +01:00
|
|
|
|
|
|
|
%files %{python_files}
|
2020-08-25 12:09:19 +02:00
|
|
|
%doc README.rst
|
2019-01-31 19:06:00 +01:00
|
|
|
%license LICENSE
|
2023-05-05 02:07:02 +02:00
|
|
|
%{python_sitelib}/pytest_randomly
|
2021-04-19 06:42:51 +02:00
|
|
|
%{python_sitelib}/pytest_randomly-%{version}*-info
|
2019-01-31 19:06:00 +01:00
|
|
|
|
|
|
|
%changelog
|