Python testing: Difference between revisions
From wikinotes
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
See [[Programming: Testing]] for best practices. | See [[Programming: Testing]] for best practices. | ||
= Test Frameworks = | |||
<blockquote> | |||
| | {| class="wikitable" | ||
|- | |- | ||
| [[python pytest]] || framework/runner for testing. very useful | | [[python pytest]] || framework/runner for testing. very useful | ||
|- | |- | ||
| [[python unittest]] || builtin testing framework. | | [[python unittest]] || builtin testing framework. | ||
|- | |||
|} | |||
</blockquote><!-- Test Runners --> | |||
= Mocking = | |||
<blockquote> | |||
{| class="wikitable" | |||
|- | |- | ||
| [[python mock]] || mock objects for better isolation | | [[python mock]] || mock objects for better isolation | ||
|- | |||
|} | |||
</blockquote><!-- Mocking --> | |||
= Test Matrices = | |||
<blockquote> | |||
{| class="wikitable" | |||
|- | |||
| [[python tox]] || run configurable test-runner in multiple versions of python | |||
|- | |||
|} | |||
</blockquote><!-- OS testing --> | |||
= Test Coverage = | |||
<blockquote> | |||
{| class="wikitable" | |||
|- | |||
| [[python coverage]] || produce reports on your test coverage | |||
|- | |||
|} | |} | ||
</blockquote><!-- Test Coverage --> |
Latest revision as of 03:42, 24 January 2022
See Programming: Testing for best practices.
Test Frameworks
python pytest framework/runner for testing. very useful python unittest builtin testing framework.
Mocking
python mock mock objects for better isolation
Test Matrices
python tox run configurable test-runner in multiple versions of python
Test Coverage
python coverage produce reports on your test coverage