Compare commits
3 Commits
Author | SHA256 | Date | |
---|---|---|---|
34f36267e9 | |||
f87ab29d24 | |||
1c51c1b08f |
BIN
pytest-asyncio-0.26.0.tar.gz
(Stored with Git LFS)
BIN
pytest-asyncio-0.26.0.tar.gz
(Stored with Git LFS)
Binary file not shown.
3
pytest-asyncio-1.0.0.tar.gz
Normal file
3
pytest-asyncio-1.0.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:fd0235c0c60badfb2f845942d19c54ce0280d1cea073ec1ec36037321c900fd8
|
||||||
|
size 45557
|
78
pytest84.patch
Normal file
78
pytest84.patch
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
From 8c6612fda96f78a1df2f0d271426b7b6e3c10737 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Yao Zi <ziyao@disroot.org>
|
||||||
|
Date: Tue, 10 Jun 2025 16:17:11 +0000
|
||||||
|
Subject: [PATCH] test: Adapt unmarked async tests in strict mode for pytest
|
||||||
|
8.4.0
|
||||||
|
|
||||||
|
Async tests fail instead of skipping and warning with Pytest 8.4.0 if
|
||||||
|
no suitable async plugin is installed[1]. Adjust expectation of these
|
||||||
|
tests to pass the testsuite with Pytest 8.4.0.
|
||||||
|
|
||||||
|
Link: https://docs.pytest.org/en/stable/changelog.html#pytest-8-4-0-2025-06-02 # [1]
|
||||||
|
Signed-off-by: Yao Zi <ziyao@disroot.org>
|
||||||
|
---
|
||||||
|
tests/modes/test_strict_mode.py | 23 ++++++++++++++++++-----
|
||||||
|
1 file changed, 18 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tests/modes/test_strict_mode.py b/tests/modes/test_strict_mode.py
|
||||||
|
index 52cbb251..44f54b7d 100644
|
||||||
|
--- a/tests/modes/test_strict_mode.py
|
||||||
|
+++ b/tests/modes/test_strict_mode.py
|
||||||
|
@@ -2,7 +2,7 @@
|
||||||
|
|
||||||
|
from textwrap import dedent
|
||||||
|
|
||||||
|
-from pytest import Pytester
|
||||||
|
+from pytest import Pytester, version_tuple as pytest_version
|
||||||
|
|
||||||
|
|
||||||
|
def test_strict_mode_cmdline(pytester: Pytester):
|
||||||
|
@@ -95,7 +95,10 @@ async def test_anything():
|
||||||
|
)
|
||||||
|
)
|
||||||
|
result = pytester.runpytest_subprocess("--asyncio-mode=strict", "-W default")
|
||||||
|
- result.assert_outcomes(skipped=1, warnings=1)
|
||||||
|
+ if pytest_version >= (8, 4, 0):
|
||||||
|
+ result.assert_outcomes(failed=1, skipped=0, warnings=0)
|
||||||
|
+ else:
|
||||||
|
+ result.assert_outcomes(skipped=1, warnings=1)
|
||||||
|
result.stdout.fnmatch_lines(["*async def functions are not natively supported*"])
|
||||||
|
|
||||||
|
|
||||||
|
@@ -117,7 +120,11 @@ async def test_anything(any_fixture):
|
||||||
|
)
|
||||||
|
)
|
||||||
|
result = pytester.runpytest_subprocess("--asyncio-mode=strict", "-W default")
|
||||||
|
- result.assert_outcomes(skipped=1, warnings=2)
|
||||||
|
+
|
||||||
|
+ if pytest_version >= (8, 4, 0):
|
||||||
|
+ result.assert_outcomes(failed=1, skipped=0, warnings=2)
|
||||||
|
+ else:
|
||||||
|
+ result.assert_outcomes(skipped=1, warnings=2)
|
||||||
|
result.stdout.fnmatch_lines(
|
||||||
|
[
|
||||||
|
"*async def functions are not natively supported*",
|
||||||
|
@@ -149,7 +156,10 @@ async def test_anything(any_fixture):
|
||||||
|
)
|
||||||
|
)
|
||||||
|
result = pytester.runpytest_subprocess("--asyncio-mode=strict", "-W default")
|
||||||
|
- result.assert_outcomes(passed=1, failed=0, skipped=0, warnings=1)
|
||||||
|
+ if pytest_version >= (8, 4, 0):
|
||||||
|
+ result.assert_outcomes(passed=1, failed=0, skipped=0, warnings=2)
|
||||||
|
+ else:
|
||||||
|
+ result.assert_outcomes(passed=1, failed=0, skipped=0, warnings=1)
|
||||||
|
result.stdout.fnmatch_lines(
|
||||||
|
[
|
||||||
|
"*warnings summary*",
|
||||||
|
@@ -193,7 +203,10 @@ async def test_anything(any_fixture):
|
||||||
|
)
|
||||||
|
)
|
||||||
|
result = pytester.runpytest_subprocess("--asyncio-mode=strict", "-W default")
|
||||||
|
- result.assert_outcomes(passed=1, warnings=1)
|
||||||
|
+ if pytest_version >= (8, 4, 0):
|
||||||
|
+ result.assert_outcomes(passed=1, warnings=2)
|
||||||
|
+ else:
|
||||||
|
+ result.assert_outcomes(passed=1, warnings=1)
|
||||||
|
result.stdout.fnmatch_lines(
|
||||||
|
[
|
||||||
|
"*warnings summary*",
|
@@ -1,3 +1,47 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jun 20 12:27:13 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
- Add upstream pytest84.patch for compatibility with pytest 8.4.0
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue May 27 11:12:52 UTC 2025 - Johannes Kastl <opensuse_buildservice@ojkastl.de>
|
||||||
|
|
||||||
|
- update to 1.0.0:
|
||||||
|
https://github.com/pytest-dev/pytest-asyncio/releases/tag/v1.0.0
|
||||||
|
* Removed
|
||||||
|
- The deprecated event_loop fixture.
|
||||||
|
(#1106)
|
||||||
|
* Added
|
||||||
|
- Prelimiary support for Python 3.14
|
||||||
|
(#1025)
|
||||||
|
* Changed
|
||||||
|
+ Scoped event loops (e.g. module-scoped loops) are created
|
||||||
|
once rather than per scope (e.g. per module). This reduces
|
||||||
|
the number of fixtures and speeds up collection time,
|
||||||
|
especially for large test suites.
|
||||||
|
(#1107)
|
||||||
|
* The loop_scope argument to pytest.mark.asyncio no longer
|
||||||
|
forces that a pytest Collector exists at the level of the
|
||||||
|
specified scope. For example, a test function marked with
|
||||||
|
pytest.mark.asyncio(loop_scope="class") no longer requires a
|
||||||
|
class surrounding the test. This is consistent with the
|
||||||
|
behavior of the scope argument to pytest_asyncio.fixture.
|
||||||
|
(#1112)
|
||||||
|
* Fixed
|
||||||
|
* An error caused when using pytest's
|
||||||
|
[--setup-plan]{.title-ref} option.
|
||||||
|
(#630)
|
||||||
|
* Unsuppressed import errors with pytest option
|
||||||
|
--doctest-ignore-import-errors
|
||||||
|
(#797)
|
||||||
|
* A "fixture not found" error in connection with package-scoped
|
||||||
|
loops
|
||||||
|
(#1052)
|
||||||
|
* Notes for Downstream Packagers
|
||||||
|
* Removed a test that had an ordering dependency on other
|
||||||
|
tests.
|
||||||
|
(#1114)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Apr 28 14:19:40 UTC 2025 - Dirk Müller <dmueller@suse.com>
|
Mon Apr 28 14:19:40 UTC 2025 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
@@ -26,12 +26,14 @@
|
|||||||
%endif
|
%endif
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-pytest-asyncio%{psuffix}
|
Name: python-pytest-asyncio%{psuffix}
|
||||||
Version: 0.26.0
|
Version: 1.0.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Pytest support for asyncio
|
Summary: Pytest support for asyncio
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
URL: https://github.com/pytest-dev/pytest-asyncio
|
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
|
Source: https://github.com/pytest-dev/pytest-asyncio/archive/v%{version}.tar.gz#/pytest-asyncio-%{version}.tar.gz
|
||||||
|
# PATCH-FIX-UPSTREAM https://github.com/pytest-dev/pytest-asyncio/commit/8c6612fda96f78a1df2f0d271426b7b6e3c10737 test: Adapt unmarked async tests in strict mode for pytest 8.4.0
|
||||||
|
Patch0: pytest84.patch
|
||||||
BuildRequires: %{python_module base >= 3.8}
|
BuildRequires: %{python_module base >= 3.8}
|
||||||
BuildRequires: %{python_module pip}
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module setuptools_scm}
|
BuildRequires: %{python_module setuptools_scm}
|
||||||
|
Reference in New Issue
Block a user