Skip to main content

Simple factoryboy random state management

Project description

PyPI version Python versions Status tests pre-commit pre-commit.ci status Black

Simple factoryboy random state management

Features

  • Show the random state of factoryboy for failing tests with cli option --show-state or by setting an environment variable.

  • Set random state through environment variable or with cli option --set-state

Requirements

Installation

You can install “pytest-factoryboy-state” via pip from PyPI:

$ pip install pytest-factoryboy-state

Usage

Show the random state of factoryboy on test failure with:

$ pytest --show-state

Or by defining the environment variable SHOW_FACTORYBOY_STATE to True.

Rerun the tests with a given state:

$ pytest --set-state=<factoryboy_state>

You can also set the environment variable FACTORYBOY_STATE to the state and run pytest as usual.

Contributing

Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.

License

Distributed under the terms of the MIT license, “pytest-factoryboy-state” is free and open source software

Issues

If you encounter any problems, please file an issue along with a detailed description.


This pytest plugin was generated with Cookiecutter along with @hackebrot’s cookiecutter-pytest-plugin template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest-factoryboy-state-0.2.0.tar.gz (12.4 kB view hashes)

Uploaded Source

Built Distribution

pytest_factoryboy_state-0.2.0-py3-none-any.whl (5.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page