]> git.pld-linux.org Git - packages/python3-pytest-asyncio.git/blob - python3-pytest-asyncio.spec
e7ce489083f21e7d8bc84ec4f54e176c15a95381
[packages/python3-pytest-asyncio.git] / python3-pytest-asyncio.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # unit tests
4
5 Summary:        Pytest support for asyncio
6 Summary(pl.UTF-8):      Wsparcie do asyncio dla Pytesta
7 Name:           python3-pytest-asyncio
8 Version:        0.18.2
9 Release:        1
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
14 # Source0-md5:  b57bafeb4f3303afa99df154835caf45
15 URL:            https://pypi.org/project/pytest-asyncio/
16 BuildRequires:  python3-modules >= 1:3.7
17 BuildRequires:  python3-setuptools
18 %if %{with tests}
19 BuildRequires:  python3-flaky >= 3.5.0
20 BuildRequires:  python3-hypothesis >= 5.7.1
21 BuildRequires:  python3-pytest >= 6.1.0
22 %if "%{py3_ver}" < "3.8"
23 BuildRequires:  python3-typing_extensions >= 3.7.2
24 %endif
25 %endif
26 BuildRequires:  rpm-pythonprov
27 BuildRequires:  rpmbuild(macros) >= 1.714
28 Requires:       python3-modules >= 1:3.7
29 BuildArch:      noarch
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
33 pytest-asyncio is an Apache 2 licensed library, written in Python, for
34 testing asyncio code with pytest.
35
36 asyncio code is usually written in the form of coroutines, which makes
37 it slightly more difficult to test using normal testing tools.
38 pytest-asyncio provides useful fixtures and markers to make testing
39 easier.
40
41 %description -l pl.UTF-8
42 pytest-asyncio to wydana na licencji Apache 2 biblioteka, napisana w
43 Pythonie, służąca do testowania kodu asynchronicznego we/wy przy
44 użyciu pytesta.
45
46 Kod asyncio jest zwykle pisany w postaci korutyn, co nieco utrudnia
47 testowanie przy użyciu zwykłych narzędzi testowych. pytest-asyncio
48 dostarcza przydatne wyposażenie i znaczniki ułatwiające testowanie.
49
50 %prep
51 %setup -q -n pytest-asyncio-%{version}
52
53 %build
54 %py3_build
55
56 %if %{with tests}
57 # test_flaky_integration failure: no expected report found
58 # test_legacy_mode failures: more warnings than expected
59 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
60 PYTEST_PLUGINS="pytest_asyncio.plugin" \
61 PYTHONPATH=$(pwd) \
62 %{__python3} -m pytest tests -k 'not test_flaky_integration and not test_legacy_mode'
63 %endif
64
65 %install
66 rm -rf $RPM_BUILD_ROOT
67
68 %py3_install
69
70 %clean
71 rm -rf $RPM_BUILD_ROOT
72
73 %files
74 %defattr(644,root,root,755)
75 %doc README.rst
76 %{py3_sitescriptdir}/pytest_asyncio
77 %{py3_sitescriptdir}/pytest_asyncio-%{version}-py*.egg-info
This page took 0.061815 seconds and 2 git commands to generate.