forked from pool/python-pytest-trio
Accepting request 829546 from home:mcalabkova:branches:devel:languages:python:pytest
- Add patch pytest6.patch to fix build OBS-URL: https://build.opensuse.org/request/show/829546 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-trio?expand=0&rev=7
This commit is contained in:
committed by
Git OBS Bridge
parent
6944fb43e5
commit
026d3c9ca6
60
pytest6.patch
Normal file
60
pytest6.patch
Normal file
@@ -0,0 +1,60 @@
|
||||
From bfef85c948cfe6bf19c78baa2d497caf7b56d81a Mon Sep 17 00:00:00 2001
|
||||
From: Kyle Altendorf <sda@fstab.net>
|
||||
Date: Sat, 22 Aug 2020 17:58:08 -0400
|
||||
Subject: [PATCH] Update .assert_outcomes() calls for pytest 6.0
|
||||
|
||||
https://github.com/python-trio/pytest-trio/pull/98#issuecomment-678699693
|
||||
---
|
||||
pytest_trio/_tests/test_fixture_mistakes.py | 8 ++++----
|
||||
test-requirements.txt | 2 +-
|
||||
2 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/pytest_trio/_tests/test_fixture_mistakes.py b/pytest_trio/_tests/test_fixture_mistakes.py
|
||||
index 6da6abb..5521a80 100644
|
||||
--- a/pytest_trio/_tests/test_fixture_mistakes.py
|
||||
+++ b/pytest_trio/_tests/test_fixture_mistakes.py
|
||||
@@ -34,7 +34,7 @@ def test_sync_indirect(indirect_trio_time):
|
||||
|
||||
result = testdir.runpytest()
|
||||
|
||||
- result.assert_outcomes(passed=1, error=2)
|
||||
+ result.assert_outcomes(passed=1, errors=2)
|
||||
result.stdout.fnmatch_lines(
|
||||
["*: Trio fixtures can only be used by Trio tests*"]
|
||||
)
|
||||
@@ -65,7 +65,7 @@ async def test_foo(self, async_class_fixture):
|
||||
|
||||
result = testdir.runpytest()
|
||||
|
||||
- result.assert_outcomes(error=1)
|
||||
+ result.assert_outcomes(errors=1)
|
||||
result.stdout.fnmatch_lines(["*: Trio fixtures must be function-scope*"])
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ async def test_whatever(async_session_fixture):
|
||||
|
||||
result = testdir.runpytest()
|
||||
|
||||
- result.assert_outcomes(error=1)
|
||||
+ result.assert_outcomes(errors=1)
|
||||
result.stdout.fnmatch_lines(["*: Trio fixtures must be function-scope*"])
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ def test_whatever(async_fixture):
|
||||
|
||||
result = testdir.runpytest()
|
||||
|
||||
- result.assert_outcomes(error=1)
|
||||
+ result.assert_outcomes(errors=1)
|
||||
result.stdout.fnmatch_lines(
|
||||
["*: Trio fixtures can only be used by Trio tests*"]
|
||||
)
|
||||
diff --git a/test-requirements.txt b/test-requirements.txt
|
||||
index b2be0f9..5c53c25 100644
|
||||
--- a/test-requirements.txt
|
||||
+++ b/test-requirements.txt
|
||||
@@ -1,3 +1,3 @@
|
||||
-pytest !=3.7.0, !=3.7.1 # https://github.com/python-trio/pytest-trio/pull/50#issuecomment-413124393
|
||||
+pytest >= 6.0.0 # https://github.com/python-trio/pytest-trio/pull/98#issuecomment-678699693
|
||||
pytest-cov
|
||||
hypothesis>=3.64
|
||||
@@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 25 11:18:03 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
|
||||
|
||||
- Add patch pytest6.patch to fix build
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 9 07:31:17 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ Summary: Pytest plugin for trio
|
||||
License: MIT OR Apache-2.0
|
||||
URL: https://github.com/python-trio/pytest-trio
|
||||
Source: https://github.com/python-trio/pytest-trio/archive/v%{version}.tar.gz
|
||||
Patch0: pytest6.patch
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
@@ -38,8 +39,9 @@ BuildRequires: %{python_module async_generator >= 1.9}
|
||||
BuildRequires: %{python_module contextvars >= 2.1}
|
||||
BuildRequires: %{python_module hypothesis >= 3.64}
|
||||
BuildRequires: %{python_module outcome}
|
||||
BuildRequires: %{python_module pytest >= 3.6}
|
||||
BuildRequires: %{python_module pytest-cov}
|
||||
# we really need newer pytest in tests than is required by the package
|
||||
BuildRequires: %{python_module pytest >= 6.0.0}
|
||||
BuildRequires: %{python_module trio >= 0.15.0}
|
||||
# /SECTION
|
||||
%python_subpackages
|
||||
@@ -49,6 +51,7 @@ This is a pytest plugin to help you test projects that use Trio, a friendly libr
|
||||
|
||||
%prep
|
||||
%setup -q -n pytest-trio-%{version}
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
%python_build
|
||||
|
||||
Reference in New Issue
Block a user