commit d52804f2861be46fcd5826e2238864960cc76224041f3d1628f9907b7e159763 Author: Todd R Date: Thu Jan 31 18:06:00 2019 +0000 Accepting request 670428 from home:TheBlackCat:branches:devel:languages:python:pytest pytest plugin for handling randomness OBS-URL: https://build.opensuse.org/request/show/670428 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-randomly?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/pytest-randomly-1.2.3.tar.gz b/pytest-randomly-1.2.3.tar.gz new file mode 100644 index 0000000..31432f7 --- /dev/null +++ b/pytest-randomly-1.2.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:92ec6745d3ebdd690ecb598648748c9601f16f5afacf83ccef2b50d23e6edb7f +size 8297 diff --git a/python-pytest-randomly.changes b/python-pytest-randomly.changes new file mode 100644 index 0000000..2459624 --- /dev/null +++ b/python-pytest-randomly.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Mon Jan 21 03:52:33 UTC 2019 - Todd R + +- Initial version diff --git a/python-pytest-randomly.spec b/python-pytest-randomly.spec new file mode 100644 index 0000000..98af91e --- /dev/null +++ b/python-pytest-randomly.spec @@ -0,0 +1,79 @@ +# +# spec file for package python-pytest-randomly +# +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# +# 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/ +# + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +Name: python-pytest-randomly +Version: 1.2.3 +Release: 0 +Summary: Pytest plugin to randomly order tests and control random.seed +License: BSD-3-Clause +Group: Development/Languages/Python +URL: https://github.com/adamchainz/pytest-randomly +Source: https://files.pythonhosted.org/packages/source/p/pytest-randomly/pytest-randomly-%{version}.tar.gz +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-pytest +BuildArch: noarch +# SECTION test requirements +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. + * Resets random.seed() at the start of every test case and test to + 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 +%setup -q -n pytest-randomly-%{version} + +%build +%python_build + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +# Tests require a full terminal +# %%check +# %%python_expand pytest-%%{$python_bin_suffix} + +%files %{python_files} +%doc AUTHORS.rst README.rst +%license LICENSE +%{python_sitelib}/* + +%changelog