Add explicit support for pytest.

Review Request #11934 — Created Jan. 18, 2022 and submitted — Latest diff uploaded

Information

kgb
master

Reviewers

kgb

kgb now registers a pytest plugin, which provides a spy_agency fixture
for unit tests. This makes it easy for tests to make use of a
SpyAgency, which will clean up after itself once the test has run.

Tests can call the new assert_* functions on the spy agency, or they
can call the individual assertion methods that have been introduced,
depending on their needs.

Unit tests pass for all supported versions of Python.

Diff Revision 2

This is not the most recent revision of the diff. The latest diff is revision 3. See what's changed.

orig
1
2
3

Commits

First Last Summary ID Author
Add explicit support for pytest.
kgb now registers a pytest plugin, which provides a `spy_agency` fixture for unit tests. This makes it easy for tests to make use of a `SpyAgency`, which will clean up after itself once the test has run. Tests can call the new `assert_*` functions on the spy agency, or they can call the individual assertion methods that have been introduced, depending on their needs.
8a737fe43646634f4f54909dbd36615c24981d4c Christian Hammond
setup.py
kgb/pytest_plugin.py
kgb/tests/test_pytest_plugin.py
Loading...