3 %bcond_with tests # unit tests (more dependencies required)
4 %bcond_without python2 # CPython 2.x module
5 %bcond_with python3 # CPython 3.x module (built from python3-pytest-randomly.spec)
7 Summary: Pytest plugin to randomly order tests and control random.seed
8 Summary(pl.UTF-8): Wtyczka pytesta do losowej kolejności testów i sterowania random.seed
9 Name: python-pytest-randomly
10 # keep 1.x here for python2 support
14 Group: Libraries/Python
15 #Source0Download: https://pypi.org/simple/pytest-randomly/
16 Source0: https://files.pythonhosted.org/packages/source/p/pytest-randomly/pytest-randomly-%{version}.tar.gz
17 # Source0-md5: a14d9ac82ac744e7c3ddf51e62d5c751
18 URL: https://pypi.org/project/pytest-randomly/
20 BuildRequires: python-modules >= 1:2.7
21 BuildRequires: python-setuptools
23 BuildRequires: python-factory_boy
24 BuildRequires: python-faker
25 BuildRequires: python-numpy
26 BuildRequires: python-six
27 BuildRequires: python-pytest
31 BuildRequires: python3-modules >= 1:3.4
32 BuildRequires: python3-setuptools
34 BuildRequires: python3-factory_boy
35 BuildRequires: python3-faker
36 BuildRequires: python3-numpy
37 BuildRequires: python3-six
38 BuildRequires: python3-pytest
41 BuildRequires: rpm-pythonprov
42 BuildRequires: rpmbuild(macros) >= 1.714
43 Requires: python-modules >= 1:2.7
45 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48 Pytest plugin to randomly order tests and control random.seed.
50 %description -l pl.UTF-8
51 Wtyczka pytesta do losowej kolejności testów i sterowania random.seed.
53 %package -n python3-pytest-randomly
54 Summary: Pytest plugin to randomly order tests and control random.seed
55 Summary(pl.UTF-8): Wtyczka pytesta do losowej kolejności testów i sterowania random.seed
56 Group: Libraries/Python
57 Requires: python3-modules >= 1:3.4
59 %description -n python3-pytest-randomly
60 Pytest plugin to randomly order tests and control random.seed.
62 %description -n python3-pytest-randomly -l pl.UTF-8
63 Wtyczka pytesta do losowej kolejności testów i sterowania random.seed.
66 %setup -q -n pytest-randomly-%{version}
73 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
74 PYTEST_PLUGINS="pytester,pytest_randomly" \
75 %{__python} -m pytest tests
83 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
84 PYTEST_PLUGINS="pytester,pytest_randomly" \
85 %{__python3} -m pytest tests
90 rm -rf $RPM_BUILD_ROOT
103 rm -rf $RPM_BUILD_ROOT
107 %defattr(644,root,root,755)
108 %doc AUTHORS.rst HISTORY.rst LICENSE README.rst
109 %{py_sitescriptdir}/pytest_randomly.py[co]
110 %{py_sitescriptdir}/pytest_randomly-%{version}-py*.egg-info
114 %files -n python3-pytest-randomly
115 %defattr(644,root,root,755)
116 %doc AUTHORS.rst HISTORY.rst LICENSE README.rst
117 %{py3_sitescriptdir}/pytest_randomly.py
118 %{py3_sitescriptdir}/__pycache__/pytest_randomly.cpython-*.py[co]
119 %{py3_sitescriptdir}/pytest_randomly-%{version}-py*.egg-info