Accepting request 1100743 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1100743 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-sybil?expand=0&rev=16
This commit is contained in:
commit
f8cc1d6122
43
pytest74.patch
Normal file
43
pytest74.patch
Normal file
@ -0,0 +1,43 @@
|
||||
From df0d221c1d9da1454a5ef7fd72675d8d43b96eb0 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Withers <chris@simplistix.co.uk>
|
||||
Date: Tue, 4 Jul 2023 18:54:22 +0100
|
||||
Subject: [PATCH] Deal with more pytest internals changing
|
||||
|
||||
---
|
||||
.circleci/config.yml | 3 ++-
|
||||
sybil/integration/pytest.py | 22 +++++++++++++++++-----
|
||||
2 files changed, 19 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/sybil/integration/pytest.py b/sybil/integration/pytest.py
|
||||
index b32062d..8529771 100644
|
||||
--- a/sybil/integration/pytest.py
|
||||
+++ b/sybil/integration/pytest.py
|
||||
@@ -78,11 +78,23 @@ def setup(self):
|
||||
def runtest(self):
|
||||
self.example.evaluate()
|
||||
|
||||
- def _prunetraceback(self, excinfo):
|
||||
- tb = excinfo.traceback.cut(path=example_module_path)
|
||||
- tb = tb[1]
|
||||
- if getattr(tb, '_rawentry', None) is not None:
|
||||
- excinfo.traceback = Traceback(tb._rawentry, excinfo)
|
||||
+ if PYTEST_VERSION >= (7, 4, 0):
|
||||
+
|
||||
+ def _traceback_filter(self, excinfo: ExceptionInfo[BaseException]) -> Traceback:
|
||||
+ traceback = excinfo.traceback
|
||||
+ tb = traceback.cut(path=example_module_path)
|
||||
+ tb = tb[1]
|
||||
+ if getattr(tb, '_rawentry', None) is not None:
|
||||
+ traceback = Traceback(tb._rawentry)
|
||||
+ return traceback
|
||||
+
|
||||
+ else:
|
||||
+
|
||||
+ def _prunetraceback(self, excinfo):
|
||||
+ tb = excinfo.traceback.cut(path=example_module_path)
|
||||
+ tb = tb[1]
|
||||
+ if getattr(tb, '_rawentry', None) is not None:
|
||||
+ excinfo.traceback = Traceback(tb._rawentry, excinfo)
|
||||
|
||||
def repr_failure(
|
||||
self,
|
@ -1,26 +0,0 @@
|
||||
diff --git a/sybil/integration/unittest.py b/sybil/integration/unittest.py
|
||||
index 7129ddf..ce34caf 100644
|
||||
--- a/sybil/integration/unittest.py
|
||||
+++ b/sybil/integration/unittest.py
|
||||
@@ -38,7 +38,7 @@ def unittest_integration(sybil: 'Sybil'):
|
||||
|
||||
def load_tests(loader=None, tests=None, pattern=None):
|
||||
suite = TestSuite()
|
||||
- for path in sybil.path.glob('**/*'):
|
||||
+ for path in sorted(sybil.path.glob('**/*')):
|
||||
if path.is_file() and sybil.should_parse(path):
|
||||
document = sybil.parse(path)
|
||||
|
||||
diff --git a/tests/test_sybil.py b/tests/test_sybil.py
|
||||
index 74a04ea..72a5aea 100644
|
||||
--- a/tests/test_sybil.py
|
||||
+++ b/tests/test_sybil.py
|
||||
@@ -243,7 +243,7 @@ def parse(document):
|
||||
|
||||
def test_namespace(capsys):
|
||||
sybil = Sybil([parse], path='./samples')
|
||||
- documents = [sybil.parse(p) for p in sybil.path.glob('sample*.txt')]
|
||||
+ documents = [sybil.parse(p) for p in sorted(sybil.path.glob('sample*.txt'))]
|
||||
actual = []
|
||||
for document in documents:
|
||||
for example in document:
|
@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 25 12:42:51 UTC 2023 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- Update to 3.0.1
|
||||
* Continue with the ever shifting sands of pytest APIs, this time
|
||||
appeasing warnings from pytest 7 that when fixed break compatibility
|
||||
with pytest 6.
|
||||
- Drop python-sybil-fix-ordering.diff
|
||||
- Add pytest74.patch to support pytest 7.4
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 13 11:23:08 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
|
@ -18,13 +18,14 @@
|
||||
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-sybil
|
||||
Version: 3.0.0
|
||||
Version: 3.0.1
|
||||
Release: 0
|
||||
Summary: Automated testing of examples in documentation
|
||||
License: MIT
|
||||
URL: https://github.com/cjw296/sybil
|
||||
Source: https://files.pythonhosted.org/packages/source/s/sybil/sybil-%{version}.tar.gz
|
||||
Patch0: python-sybil-fix-ordering.diff
|
||||
#PATCH-FIX-UPSTREAM https://github.com/simplistix/sybil/commit/df0d221c1d9da1454a5ef7fd72675d8d43b96eb0 Deal with more pytest internals changing
|
||||
Patch: pytest74.patch
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module pytest >= 6.2}
|
||||
BuildRequires: %{python_module setuptools-git}
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7692ed66e793e5e79ae6a70cf2cf861917ed48eaff0d8adf825e64d85820f251
|
||||
size 38011
|
BIN
sybil-3.0.1.tar.gz
(Stored with Git LFS)
Normal file
BIN
sybil-3.0.1.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user