Accepting request 676166 from devel:languages:python:pytest

- Make sure we execute tests

OBS-URL: https://build.opensuse.org/request/show/676166
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-randomly?expand=0&rev=2
This commit is contained in:
Stephan Kulow 2019-02-25 16:51:13 +00:00 committed by Git OBS Bridge
commit 6b653eefe0
2 changed files with 12 additions and 6 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Feb 14 15:24:04 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Make sure we execute tests
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Jan 21 03:52:33 UTC 2019 - Todd R <toddrme2178@gmail.com> Mon Jan 21 03:52:33 UTC 2019 - Todd R <toddrme2178@gmail.com>

View File

@ -25,13 +25,16 @@ License: BSD-3-Clause
Group: Development/Languages/Python Group: Development/Languages/Python
URL: https://github.com/adamchainz/pytest-randomly URL: https://github.com/adamchainz/pytest-randomly
Source: https://files.pythonhosted.org/packages/source/p/pytest-randomly/pytest-randomly-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/p/pytest-randomly/pytest-randomly-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
Requires: python-Faker
Requires: python-pytest Requires: python-pytest
BuildArch: noarch BuildArch: noarch
# SECTION test requirements # SECTION test requirements
BuildRequires: %{python_module Faker}
BuildRequires: %{python_module factory_boy}
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytest}
# /SECTION # /SECTION
%python_subpackages %python_subpackages
@ -40,12 +43,11 @@ BuildRequires: %{python_module pytest}
Pytest plugin to randomly order tests and control random.seed. Pytest plugin to randomly order tests and control random.seed.
Features: Features:
* Randomly shuffles the order of test items. This is done first at * 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 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 have them), then at the order of functions. This also works with
things like doctests. things like doctests.
* Resets random.seed() at the start of every test case and test to * Resets random.seed() at the start of every test case and test to
fixed number - this defaults to time.time() from the start of fixed number - this defaults to time.time() from the start of
your test run, but you can pass in --randomly-seed to repeat a your test run, but you can pass in --randomly-seed to repeat a
randomness-induced failure. randomness-induced failure.
@ -67,9 +69,8 @@ Features:
%python_install %python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
# Tests require a full terminal %check
# %%check %python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} py.test-%{$python_bin_suffix} -v
# %%python_expand pytest-%%{$python_bin_suffix}
%files %{python_files} %files %{python_files}
%doc AUTHORS.rst README.rst %doc AUTHORS.rst README.rst