diff options
Diffstat (limited to 'dev-python/sybil')
-rw-r--r-- | dev-python/sybil/Manifest | 5 | ||||
-rw-r--r-- | dev-python/sybil/files/sybil-3.0.0-test-order.patch | 45 | ||||
-rw-r--r-- | dev-python/sybil/metadata.xml | 2 | ||||
-rw-r--r-- | dev-python/sybil/sybil-3.0.0.ebuild | 21 |
4 files changed, 71 insertions, 2 deletions
diff --git a/dev-python/sybil/Manifest b/dev-python/sybil/Manifest index 750b0242d858..35deb98b229a 100644 --- a/dev-python/sybil/Manifest +++ b/dev-python/sybil/Manifest @@ -1,4 +1,7 @@ AUX sybil-2.0.1-py310.patch 3513 BLAKE2B 5004b889f186591a31e990b7bc88eec5063b67e2d43103e73c6a4c411b96d804762421cd24440a4caa2622abaf04c6b4e1e5417e2e1644339fedbf9c6aab7292 SHA512 450b21492c70dc8838b9eeb515d9dfbd36e857da6c641598e3a95e6499431476b5c864f466653e36015236b5c13c2056cd324adbe44d9a52bd9d8fc17260708a +AUX sybil-3.0.0-test-order.patch 1864 BLAKE2B 8b84a7148a51c5f7ac6f2c0a2c296ae6833c80dd27f5a3d260aa40c7ed88f5a90480b8961266620d91fd67acffe462fa63d206df2e9f0bd35b50912f9d9716c4 SHA512 f2b11a7a7f53a8ead589efdb89e84fa1508833d5ab248e23da386f96bc949ad17e3c45aea7afbc5bfbe0148f5ad368ccafef37dcef0d2ba6877cdb112b6f8bb0 DIST sybil-2.0.1.tar.gz 29316 BLAKE2B cf03bc1595efab535d1248b9d267dcd01547f02539977c12b8753e70d13ea0744a6ab76dc1e44fd1c46d192577aa4c1a9b5d5d52678928acfd63937358fa3e33 SHA512 4f3be7686c1acf6812623a756fa79b41e3fbe5d4c3b4c7cf5dfe39fbe56806b4ef3acd24e25968ab9119b2c65ad5c30eabe32f1a93fb62ba8d3893ef123e69f0 +DIST sybil-3.0.0.tar.gz 38011 BLAKE2B 7a42d5b0f3f13ac111d9edc9f74cb4d968f49680bb33d267ee762e830b134fa8c2e1697834d6a6a7aa09c9cd1dc52552379ca43e6667ee844f54f34b8bd3ffc7 SHA512 b6f5b5ebdeeab2ecbe17b6f83f0bc7e83e68f8e784b6a0eea292020db42294f8a1d0288d208f8a5803d5866038c3226f0b7d0d177c91469c4651364078d1bb4d EBUILD sybil-2.0.1.ebuild 475 BLAKE2B e1c7d174ede80ea3907674b271d8ee38af02ca9a2d5724957aac1b95d70afd7b0b36c1fa8689643d846df141b9be9accf6f84785df227a3a15c6e72e681e0f65 SHA512 8ce03f90558d6ee63fff2d7e2b3707c5cc674077853b54b4585ca5b8b1747b197e32a48b6c3bb5c20e7a3014417ecdc3428bcbb0ea0c14a0b54cb77831a8f06a -MISC metadata.xml 398 BLAKE2B b684246bafcc1701d3bb827a404a7fdfa8312cb94527a5cc89f41b079161696d7254d5db8a9c9a084d70dc5e54286e5ef4e2f36022934f6e3d26acf36e461881 SHA512 4d29f97cfd6cec4b9d9dc01cd1f173c48b55fcc5d5c3efd21e76d5dbae2e9d7414f716ab4946b8f372cd1317a47c51d865a984eb0a07649d3a7833cf3a701c5c +EBUILD sybil-3.0.0.ebuild 486 BLAKE2B 986201ae61508baa13d0a37af0c53c1e9953c7e13c0f065923d9722938cb0e928a7176a3e3a64cbe133a37e0eff512551712174dd61158d80ef90d3eb4740ee0 SHA512 82435774dfb4c2728066e012f972dc37d40a666d78f595a12711cdc939b325a94bb044a81eb9f03fc33cf584466b12295b4e5dd779492b7dfeed8db1b69383ad +MISC metadata.xml 402 BLAKE2B 3fcce3ac9ff731e24a3f6e761da2d840b3a7c9107b3d9a46afe00fed61b475d1400580b4ccf49dd71f6a1ab8098dc2aaf895e529a723cd96301d1400ee211edf SHA512 138106c714dc33871ccf535cc47d669580b665c842adfea5442a03067fe507236d8fde4158f006e1188003abe53c9c25db98632dadd1cfa0e41efd1755c2c75c 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 new file mode 100644 index 000000000000..1badf5b06a19 --- /dev/null +++ b/dev-python/sybil/files/sybil-3.0.0-test-order.patch @@ -0,0 +1,45 @@ +From 4d1e1c891bd619a0dec0a265a930bf49050833d1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Wed, 27 Oct 2021 13:07:01 +0200 +Subject: [PATCH] Restore sorting of test paths to make tests reliable again + +11496eb5761761b687ad4889b4173d3124caa844 has replaced the all_documents +method with a direct call to glob. This has implicitly resulted +in removal of path sorting that in turn means that the test output +depends on filesystem order now and is no longer reliable. +In particular, the tests can now fail randomly depending +on the underlying filesystem, unpack/checkout order, etc. Restore +explicit sorting to make test order predictable again. + +Fixes #34 +--- + sybil/integration/unittest.py | 2 +- + tests/test_sybil.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +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: diff --git a/dev-python/sybil/metadata.xml b/dev-python/sybil/metadata.xml index 24dad470d827..aba09c672231 100644 --- a/dev-python/sybil/metadata.xml +++ b/dev-python/sybil/metadata.xml @@ -8,6 +8,6 @@ <stabilize-allarches/> <upstream> <remote-id type="pypi">sybil</remote-id> - <remote-id type="github">cjw296/sybil</remote-id> + <remote-id type="github">simplistix/sybil</remote-id> </upstream> </pkgmetadata> diff --git a/dev-python/sybil/sybil-3.0.0.ebuild b/dev-python/sybil/sybil-3.0.0.ebuild new file mode 100644 index 000000000000..5ac40aac71ef --- /dev/null +++ b/dev-python/sybil/sybil-3.0.0.ebuild @@ -0,0 +1,21 @@ +# Copyright 2019-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..10} ) +inherit distutils-r1 + +DESCRIPTION="Automated testing for the examples in your documentation" +HOMEPAGE="https://github.com/simplistix/sybil" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86" + +distutils_enable_tests pytest + +PATCHES=( + "${FILESDIR}"/${P}-test-order.patch +) |