Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/untitaker/pytest-subtesthack
A hack to explicitly set up and tear down fixtures.
https://github.com/untitaker/pytest-subtesthack
Last synced: 13 days ago
JSON representation
A hack to explicitly set up and tear down fixtures.
- Host: GitHub
- URL: https://github.com/untitaker/pytest-subtesthack
- Owner: untitaker
- License: unlicense
- Archived: true
- Created: 2016-01-09T22:10:43.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2022-07-16T13:30:18.000Z (over 2 years ago)
- Last Synced: 2024-07-15T02:04:24.566Z (4 months ago)
- Language: Python
- Homepage:
- Size: 8.79 KB
- Stars: 17
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
==================
pytest-subtesthack
==================A hack to explicitly set up and tear down fixtures.
This terrible plugin allows you to set up and tear down fixtures *within* the
test function itself. This is useful (necessary!) for using `Hypothesis
`_ inside py.test, as hypothesis will
call the test function multiple times, without setting up or tearing down
fixture state as is normally the case.Installation::
pip install pytest-subtesthack
...though the plugin is 32 lines of code, consider vendoring it.
See ``test_example.py`` for usage.