Metadata-Version: 2.1
Name: pytest-factoryboy-state
Version: 0.1.0
Summary: Simple factoryboy random state management
Home-page: https://github.com/hrother/pytest-factoryboy-state
Author: Holger Rother
Author-email: hrother@hrother.org
Maintainer: Holger Rother
Maintainer-email: hrother@hrother.org
License: MIT
Keywords: pytest factoryboy
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: Pytest
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Testing
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.6
Requires-Dist: pytest (>=5.0)
Requires-Dist: factory-boy (>=3.1.0)
Provides-Extra: dev
Requires-Dist: pre-commit ; extra == 'dev'
Requires-Dist: tox ; extra == 'dev'

=======================
pytest-factoryboy-state
=======================

.. image:: https://img.shields.io/pypi/v/pytest-factoryboy-state.svg
    :target: https://pypi.org/project/pytest-factoryboy-state
    :alt: PyPI version

.. image:: https://img.shields.io/pypi/pyversions/pytest-factoryboy-state.svg
    :target: https://pypi.org/project/pytest-factoryboy-state
    :alt: Python versions



Simple factoryboy random state management


Features
--------

* Show the random state of factoryboy for failing tests with `--show-state`
* Set random state through environment variable or with cli option `--set-state`


Requirements
------------

* Python 3
* `pytest`_
* `factoryboy`_


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

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.

.. _`Cookiecutter`: https://github.com/audreyr/cookiecutter
.. _`@hackebrot`: https://github.com/hackebrot
.. _`MIT`: http://opensource.org/licenses/MIT
.. _`BSD-3`: http://opensource.org/licenses/BSD-3-Clause
.. _`GNU GPL v3.0`: http://www.gnu.org/licenses/gpl-3.0.txt
.. _`Apache Software License 2.0`: http://www.apache.org/licenses/LICENSE-2.0
.. _`cookiecutter-pytest-plugin`: https://github.com/pytest-dev/cookiecutter-pytest-plugin
.. _`file an issue`: https://github.com/hrother/pytest-factoryboy-state/issues
.. _`pytest`: https://github.com/pytest-dev/pytest
.. _`tox`: https://tox.readthedocs.io/en/latest/
.. _`pip`: https://pypi.org/project/pip/
.. _`PyPI`: https://pypi.org/project
.. _`factoryboy`: https://factoryboy.readthedocs.io/en/stable/


