Files
guru/dev-python/pytest-randomly/metadata.xml
Alessandro Barbieri a25775e33e dev-python/pytest-randomly: deps cleanup
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
2020-04-27 23:24:15 +02:00

42 lines
2.7 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?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 Googles 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 boys 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. Ive 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>