1 |
commit: 479fece57e01e18cb98af01545a4bf2d299cfe5a |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Oct 28 05:19:06 2021 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Oct 28 07:00:29 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=479fece5 |
7 |
|
8 |
dev-python/sybil: Bump to 3.0.0 |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/sybil/Manifest | 1 + |
13 |
.../sybil/files/sybil-3.0.0-test-order.patch | 45 ++++++++++++++++++++++ |
14 |
dev-python/sybil/metadata.xml | 2 +- |
15 |
dev-python/sybil/sybil-3.0.0.ebuild | 21 ++++++++++ |
16 |
4 files changed, 68 insertions(+), 1 deletion(-) |
17 |
|
18 |
diff --git a/dev-python/sybil/Manifest b/dev-python/sybil/Manifest |
19 |
index c7aaeb7e183..d344d357439 100644 |
20 |
--- a/dev-python/sybil/Manifest |
21 |
+++ b/dev-python/sybil/Manifest |
22 |
@@ -1 +1,2 @@ |
23 |
DIST sybil-2.0.1.tar.gz 29316 BLAKE2B cf03bc1595efab535d1248b9d267dcd01547f02539977c12b8753e70d13ea0744a6ab76dc1e44fd1c46d192577aa4c1a9b5d5d52678928acfd63937358fa3e33 SHA512 4f3be7686c1acf6812623a756fa79b41e3fbe5d4c3b4c7cf5dfe39fbe56806b4ef3acd24e25968ab9119b2c65ad5c30eabe32f1a93fb62ba8d3893ef123e69f0 |
24 |
+DIST sybil-3.0.0.tar.gz 38011 BLAKE2B 7a42d5b0f3f13ac111d9edc9f74cb4d968f49680bb33d267ee762e830b134fa8c2e1697834d6a6a7aa09c9cd1dc52552379ca43e6667ee844f54f34b8bd3ffc7 SHA512 b6f5b5ebdeeab2ecbe17b6f83f0bc7e83e68f8e784b6a0eea292020db42294f8a1d0288d208f8a5803d5866038c3226f0b7d0d177c91469c4651364078d1bb4d |
25 |
|
26 |
diff --git a/dev-python/sybil/files/sybil-3.0.0-test-order.patch b/dev-python/sybil/files/sybil-3.0.0-test-order.patch |
27 |
new file mode 100644 |
28 |
index 00000000000..1badf5b06a1 |
29 |
--- /dev/null |
30 |
+++ b/dev-python/sybil/files/sybil-3.0.0-test-order.patch |
31 |
@@ -0,0 +1,45 @@ |
32 |
+From 4d1e1c891bd619a0dec0a265a930bf49050833d1 Mon Sep 17 00:00:00 2001 |
33 |
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o> |
34 |
+Date: Wed, 27 Oct 2021 13:07:01 +0200 |
35 |
+Subject: [PATCH] Restore sorting of test paths to make tests reliable again |
36 |
+ |
37 |
+11496eb5761761b687ad4889b4173d3124caa844 has replaced the all_documents |
38 |
+method with a direct call to glob. This has implicitly resulted |
39 |
+in removal of path sorting that in turn means that the test output |
40 |
+depends on filesystem order now and is no longer reliable. |
41 |
+In particular, the tests can now fail randomly depending |
42 |
+on the underlying filesystem, unpack/checkout order, etc. Restore |
43 |
+explicit sorting to make test order predictable again. |
44 |
+ |
45 |
+Fixes #34 |
46 |
+--- |
47 |
+ sybil/integration/unittest.py | 2 +- |
48 |
+ tests/test_sybil.py | 2 +- |
49 |
+ 2 files changed, 2 insertions(+), 2 deletions(-) |
50 |
+ |
51 |
+diff --git a/sybil/integration/unittest.py b/sybil/integration/unittest.py |
52 |
+index 7129ddf..ce34caf 100644 |
53 |
+--- a/sybil/integration/unittest.py |
54 |
++++ b/sybil/integration/unittest.py |
55 |
+@@ -38,7 +38,7 @@ def unittest_integration(sybil: 'Sybil'): |
56 |
+ |
57 |
+ def load_tests(loader=None, tests=None, pattern=None): |
58 |
+ suite = TestSuite() |
59 |
+- for path in sybil.path.glob('**/*'): |
60 |
++ for path in sorted(sybil.path.glob('**/*')): |
61 |
+ if path.is_file() and sybil.should_parse(path): |
62 |
+ document = sybil.parse(path) |
63 |
+ |
64 |
+diff --git a/tests/test_sybil.py b/tests/test_sybil.py |
65 |
+index 74a04ea..72a5aea 100644 |
66 |
+--- a/tests/test_sybil.py |
67 |
++++ b/tests/test_sybil.py |
68 |
+@@ -243,7 +243,7 @@ def parse(document): |
69 |
+ |
70 |
+ def test_namespace(capsys): |
71 |
+ sybil = Sybil([parse], path='./samples') |
72 |
+- documents = [sybil.parse(p) for p in sybil.path.glob('sample*.txt')] |
73 |
++ documents = [sybil.parse(p) for p in sorted(sybil.path.glob('sample*.txt'))] |
74 |
+ actual = [] |
75 |
+ for document in documents: |
76 |
+ for example in document: |
77 |
|
78 |
diff --git a/dev-python/sybil/metadata.xml b/dev-python/sybil/metadata.xml |
79 |
index 24dad470d82..aba09c67223 100644 |
80 |
--- a/dev-python/sybil/metadata.xml |
81 |
+++ b/dev-python/sybil/metadata.xml |
82 |
@@ -8,6 +8,6 @@ |
83 |
<stabilize-allarches/> |
84 |
<upstream> |
85 |
<remote-id type="pypi">sybil</remote-id> |
86 |
- <remote-id type="github">cjw296/sybil</remote-id> |
87 |
+ <remote-id type="github">simplistix/sybil</remote-id> |
88 |
</upstream> |
89 |
</pkgmetadata> |
90 |
|
91 |
diff --git a/dev-python/sybil/sybil-3.0.0.ebuild b/dev-python/sybil/sybil-3.0.0.ebuild |
92 |
new file mode 100644 |
93 |
index 00000000000..5ac40aac71e |
94 |
--- /dev/null |
95 |
+++ b/dev-python/sybil/sybil-3.0.0.ebuild |
96 |
@@ -0,0 +1,21 @@ |
97 |
+# Copyright 2019-2021 Gentoo Authors |
98 |
+# Distributed under the terms of the GNU General Public License v2 |
99 |
+ |
100 |
+EAPI=8 |
101 |
+ |
102 |
+PYTHON_COMPAT=( python3_{8..10} ) |
103 |
+inherit distutils-r1 |
104 |
+ |
105 |
+DESCRIPTION="Automated testing for the examples in your documentation" |
106 |
+HOMEPAGE="https://github.com/simplistix/sybil" |
107 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
108 |
+ |
109 |
+LICENSE="MIT" |
110 |
+SLOT="0" |
111 |
+KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86" |
112 |
+ |
113 |
+distutils_enable_tests pytest |
114 |
+ |
115 |
+PATCHES=( |
116 |
+ "${FILESDIR}"/${P}-test-order.patch |
117 |
+) |