1
0
python-pytest-asyncio/python-pytest-asyncio.spec
Dirk Mueller 0220ff5e29 - update to 0.23.3:
* Fixes a bug that caused event loops to be closed prematurely
    when using async generator fixtures with class scope or wider
    in a function-scoped test #706
  * Fixes various bugs that caused an internal pytest error
    during test collection #711 #713 #719
  * Fixes a bug that caused an internal pytest error when
    collecting .txt files
  * Fixes a bug that caused an internal pytest error when using
    module-level skips #701
    This release is backwards-compatible with v0.21. Changes are
    non-breaking, unless you upgrade from v0.22.
  * BREAKING: The asyncio_event_loop mark has been removed.
    Event loops with class, module, package, and session scopes
    can be requested via the scope keyword argument to the
    _asyncio_ mark. -
    Introduces the event_loop_policy fixture which allows testing
    with non-default or multiple event loops
  * Introduces pytest_asyncio.is_async_test which returns whether
    a test item is managed by pytest-asyncio
  * Removes and pytest trio, mypy, and flaky from the test
    dependencies
  * Deprecate redefinition of the event_loop fixture. #587 Users
    requiring a class-scoped or module-scoped asyncio event loop
    for their tests should mark the corresponding class or module
    with asyncio_event_loop.
  * Test items based on asynchronous generators always exit with
    xfail status and emit a warning during the collection phase.
    This behavior is consistent with synchronous yield tests.
    #642

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-asyncio?expand=0&rev=36
2024-01-02 12:15:19 +00:00

89 lines
2.6 KiB
RPMSpec

#
# spec file
#
# Copyright (c) 2024 SUSE LLC
#
# 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/
#
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
%{?sle15_python_module_pythons}
Name: python-pytest-asyncio%{psuffix}
Version: 0.23.3
Release: 0
Summary: Pytest support for asyncio
License: Apache-2.0
URL: https://github.com/pytest-dev/pytest-asyncio
Source: https://github.com/pytest-dev/pytest-asyncio/archive/v%{version}.tar.gz#/pytest-asyncio-%{version}.tar.gz
BuildRequires: %{python_module base >= 3.8}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-pytest >= 7.0.0
%if 0%{?python_version_nodots} < 38
Requires: python-typing-extensions >= 3.7.2
%endif
BuildArch: noarch
%if %{with test}
BuildRequires: %{python_module hypothesis >= 5.7.1}
BuildRequires: %{python_module pytest >= 7.0.0}
BuildRequires: %{python_module pytest-asyncio = %{version}}
%endif
%python_subpackages
%description
pytest-asyncio is a Python library used for testing asyncio code with pytest.
asyncio code is usually written in the form of coroutines, which makes it
slightly more difficult to test using normal testing tools. pytest-asyncio
provides useful fixtures and markers to make testing easier.
%prep
%autosetup -p1 -n pytest-asyncio-%{version}
%build
export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
%pyproject_wheel
%if !%{with test}
%install
export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
%if %{with test}
%check
%pytest
%endif
%if !%{with test}
%files %{python_files}
%doc README.rst
%license LICENSE
%{python_sitelib}/pytest_asyncio
%{python_sitelib}/pytest_asyncio-%{version}.dist-info
%endif
%changelog