]>
Commit | Line | Data |
---|---|---|
bda4c6eb JB |
1 | # |
2 | # Conditional build: | |
639e9c9b | 3 | %bcond_without tests # unit tests |
bda4c6eb JB |
4 | |
5 | Summary: Pytest support for asyncio | |
6 | Summary(pl.UTF-8): Wsparcie do asyncio dla Pytesta | |
7 | Name: python3-pytest-asyncio | |
0663110e JB |
8 | Version: 0.19.0 |
9 | Release: 1 | |
bda4c6eb JB |
10 | License: Apache v2.0 |
11 | Group: Libraries/Python | |
12 | #Source0Download: https://pypi.org/simple/pytest-asyncio/ | |
13 | Source0: https://files.pythonhosted.org/packages/source/p/pytest-asyncio/pytest-asyncio-%{version}.tar.gz | |
0663110e | 14 | # Source0-md5: 0c74a0ae2b509735594684bf00512252 |
bda4c6eb | 15 | URL: https://pypi.org/project/pytest-asyncio/ |
639e9c9b | 16 | BuildRequires: python3-modules >= 1:3.7 |
0663110e JB |
17 | BuildRequires: python3-setuptools >= 1:51.0 |
18 | #BuildRequires: python3-setuptools_scm >= 6.2 | |
19 | BuildRequires: python3-toml | |
bda4c6eb | 20 | %if %{with tests} |
639e9c9b | 21 | BuildRequires: python3-flaky >= 3.5.0 |
bda4c6eb | 22 | BuildRequires: python3-hypothesis >= 5.7.1 |
639e9c9b | 23 | BuildRequires: python3-pytest >= 6.1.0 |
0663110e JB |
24 | BuildRequires: python3-pytest-trio |
25 | %if "%{py3_ver}" == "3.7" | |
639e9c9b JB |
26 | BuildRequires: python3-typing_extensions >= 3.7.2 |
27 | %endif | |
bda4c6eb JB |
28 | %endif |
29 | BuildRequires: rpm-pythonprov | |
30 | BuildRequires: rpmbuild(macros) >= 1.714 | |
639e9c9b | 31 | Requires: python3-modules >= 1:3.7 |
bda4c6eb JB |
32 | BuildArch: noarch |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
34 | ||
35 | %description | |
36 | pytest-asyncio is an Apache 2 licensed library, written in Python, for | |
37 | testing asyncio code with pytest. | |
38 | ||
39 | asyncio code is usually written in the form of coroutines, which makes | |
40 | it slightly more difficult to test using normal testing tools. | |
41 | pytest-asyncio provides useful fixtures and markers to make testing | |
42 | easier. | |
43 | ||
44 | %description -l pl.UTF-8 | |
45 | pytest-asyncio to wydana na licencji Apache 2 biblioteka, napisana w | |
46 | Pythonie, służąca do testowania kodu asynchronicznego we/wy przy | |
47 | użyciu pytesta. | |
48 | ||
49 | Kod asyncio jest zwykle pisany w postaci korutyn, co nieco utrudnia | |
50 | testowanie przy użyciu zwykłych narzędzi testowych. pytest-asyncio | |
51 | dostarcza przydatne wyposażenie i znaczniki ułatwiające testowanie. | |
52 | ||
53 | %prep | |
54 | %setup -q -n pytest-asyncio-%{version} | |
55 | ||
0663110e JB |
56 | # stub for setuptools |
57 | cat >setup.py <<EOF | |
58 | from setuptools import setup | |
59 | setup() | |
60 | EOF | |
61 | ||
bda4c6eb JB |
62 | %build |
63 | %py3_build | |
64 | ||
65 | %if %{with tests} | |
639e9c9b JB |
66 | # test_flaky_integration failure: no expected report found |
67 | # test_legacy_mode failures: more warnings than expected | |
68 | PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ | |
0663110e | 69 | PYTEST_PLUGINS="pytest_asyncio.plugin,pytest_trio.plugin" \ |
639e9c9b JB |
70 | PYTHONPATH=$(pwd) \ |
71 | %{__python3} -m pytest tests -k 'not test_flaky_integration and not test_legacy_mode' | |
bda4c6eb JB |
72 | %endif |
73 | ||
74 | %install | |
75 | rm -rf $RPM_BUILD_ROOT | |
76 | ||
77 | %py3_install | |
78 | ||
79 | %clean | |
80 | rm -rf $RPM_BUILD_ROOT | |
81 | ||
82 | %files | |
83 | %defattr(644,root,root,755) | |
0663110e | 84 | %doc CHANGELOG.rst README.rst |
bda4c6eb JB |
85 | %{py3_sitescriptdir}/pytest_asyncio |
86 | %{py3_sitescriptdir}/pytest_asyncio-%{version}-py*.egg-info |