summaryrefslogtreecommitdiff
path: root/dev-python/pytest-randomly
diff options
context:
space:
mode:
authorLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2022-04-12 21:03:09 +0000
committerLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2022-04-12 21:03:09 +0000
commitd97953e6ff67978da9554e7b4601aedceb21e215 (patch)
tree674053c902db6972b9716c9ac3b1e960ee7a5358 /dev-python/pytest-randomly
parent1d1fa5bb30df70070bbbbd2b777b839d31f09c41 (diff)
downloadbaldeagleos-repo-d97953e6ff67978da9554e7b4601aedceb21e215.tar.gz
baldeagleos-repo-d97953e6ff67978da9554e7b4601aedceb21e215.tar.xz
baldeagleos-repo-d97953e6ff67978da9554e7b4601aedceb21e215.zip
Adding metadata
Diffstat (limited to 'dev-python/pytest-randomly')
-rw-r--r--dev-python/pytest-randomly/Manifest2
-rw-r--r--dev-python/pytest-randomly/metadata.xml41
-rw-r--r--dev-python/pytest-randomly/pytest-randomly-3.10.1.ebuild39
-rw-r--r--dev-python/pytest-randomly/pytest-randomly-3.11.0.ebuild38
4 files changed, 120 insertions, 0 deletions
diff --git a/dev-python/pytest-randomly/Manifest b/dev-python/pytest-randomly/Manifest
new file mode 100644
index 000000000000..e6374a38f1e4
--- /dev/null
+++ b/dev-python/pytest-randomly/Manifest
@@ -0,0 +1,2 @@
+DIST pytest-randomly-3.10.1.tar.gz 28000 BLAKE2B 662f28e34db5dace9d421d91bb8baf3775c7e5163fa93eeb12cbe3de251ea5425d995301e193253f55a602d98deeaf0dc2e676be9bdb7a97db93ba54fa9cfa5f SHA512 d93e017df706d7021ff3f4682b4ed65d474177a60e303455685266d47a0a214e4f30b2f7dd150768de711d602ca1d22e2cfeca2703a7139cfaab97e3424afa1c
+DIST pytest-randomly-3.11.0.tar.gz 30822 BLAKE2B 81411f8882f786c18ded69d42296117421498515ed0808064b4da418f94be5aa6e0dedf1dabf0e87f8f508b9cc886f8b645e4b5f845009cade4f20b8f437dd95 SHA512 6c2da071492d032b60782c17aee01751fe0728f921dfd192a17d9be95330ddf6dd0c960ef93a200dbe990c8457340008c556f28aea9cbc74677984fee0618ad7
diff --git a/dev-python/pytest-randomly/metadata.xml b/dev-python/pytest-randomly/metadata.xml
new file mode 100644
index 000000000000..e9b1d8072917
--- /dev/null
+++ b/dev-python/pytest-randomly/metadata.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>lssndrbarbieri@gmail.com</email>
+ <name>Alessandro Barbieri</name>
+ </maintainer>
+ <longdescription lang="en">
+Features
+
+All of these features are on by default but can be disabled with flags.
+
+ Randomly shuffles the order of test items. This is done first at the level of modules, then at the level of test classes (if you have them), then at the order of functions. This also works with things like doctests.
+ Resets random.seed() at the start of every test case and test to a fixed number - this defaults to time.time() from the start of your test run, but you can pass in --randomly-seed to repeat a randomness-induced failure.
+ If factory boy is installed, its random state is reset at the start of every test. This allows for repeatable use of its random ‘fuzzy’ features.
+ If faker is installed, its random state is reset at the start of every test. This is also for repeatable fuzzy data in tests - factory boy uses faker for lots of data.
+ If numpy is installed, its random state is reset at the start of every test.
+ If additional random generators are used, they can be registered under the pytest_randomly.random_seeder entry point and will have their seed reset at the start of every test. Register a function that takes the current seed value.
+ Works with pytest-xdist.
+
+About
+
+Randomness in testing can be quite powerful to discover hidden flaws in the tests themselves, as well as giving a little more coverage to your system.
+
+By randomly ordering the tests, the risk of surprising inter-test dependencies is reduced - a technique used in many places, for example Google’s C++ test runner googletest.
+
+By resetting the random seed to a repeatable number for each test, tests can create data based on random numbers and yet remain repeatable, for example factory boy’s fuzzy values. This is good for ensuring that tests specify the data they need and that the tested system is not affected by any data that is filled in randomly due to not being specified.
+
+This plugin is a Pytest port of my plugin for nose, nose-randomly. I’ve written a blog post on its history.
+ </longdescription>
+ <upstream>
+ <bugs-to>https://github.com/pytest-dev/pytest-randomly/issues</bugs-to>
+ <changelog>https://github.com/pytest-dev/pytest-randomly/blob/master/HISTORY.rst</changelog>
+ <maintainer status="active">
+ <email>me@adamj.eu</email>
+ <name>Adam Johnson</name>
+ </maintainer>
+ <remote-id type="pypi">pytest-randomly</remote-id>
+ <remote-id type="github">pytest-dev/pytest-randomly</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-python/pytest-randomly/pytest-randomly-3.10.1.ebuild b/dev-python/pytest-randomly/pytest-randomly-3.10.1.ebuild
new file mode 100644
index 000000000000..f2fc4f1d475a
--- /dev/null
+++ b/dev-python/pytest-randomly/pytest-randomly-3.10.1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{7,8,9,10} )
+
+inherit distutils-r1
+
+DESCRIPTION="Pytest plugin to randomly order tests and control random.seed"
+HOMEPAGE="
+ https://pypi.python.org/pypi/pytest-randomly
+ https://github.com/pytest-dev/pytest-randomly
+"
+SRC_URI="https://github.com/pytest-dev/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="
+ dev-python/factory_boy[${PYTHON_USEDEP}]
+ dev-python/Faker[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/pytest[${PYTHON_USEDEP}]
+ dev-python/pytest-xdist[${PYTHON_USEDEP}]
+
+ $(python_gen_cond_dep '>=dev-python/importlib_metadata-3.6.0[${PYTHON_USEDEP}]' python3_{8,9})
+"
+DEPEND="${RDEPEND}"
+
+distutils_enable_tests pytest
+
+python_test() {
+ distutils_install_for_testing --via-root
+ pytest -vv \
+ --deselect tests/test_pytest_randomly.py::test_entrypoint_injection \
+ || die "Testsuite failed under ${EPYTHON}"
+}
diff --git a/dev-python/pytest-randomly/pytest-randomly-3.11.0.ebuild b/dev-python/pytest-randomly/pytest-randomly-3.11.0.ebuild
new file mode 100644
index 000000000000..2bef1d1e3407
--- /dev/null
+++ b/dev-python/pytest-randomly/pytest-randomly-3.11.0.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{7,8,9,10} )
+
+inherit distutils-r1
+
+DESCRIPTION="Pytest plugin to randomly order tests and control random.seed"
+HOMEPAGE="
+ https://pypi.python.org/pypi/pytest-randomly/
+ https://github.com/pytest-dev/pytest-randomly
+"
+SRC_URI="https://github.com/pytest-dev/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="
+ dev-python/factory_boy[${PYTHON_USEDEP}]
+ dev-python/Faker[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/pytest[${PYTHON_USEDEP}]
+ dev-python/pytest-xdist[${PYTHON_USEDEP}]
+
+ $(python_gen_cond_dep '>=dev-python/importlib_metadata-3.6.0[${PYTHON_USEDEP}]' python3_{8,9})
+"
+DEPEND="${RDEPEND}"
+
+distutils_enable_tests pytest
+
+python_test() {
+ distutils_install_for_testing --via-root
+ pytest -vv || die "Testsuite failed under ${EPYTHON}"
+}