PyISpy
- Free software: MIT license
- Documentation: https://pyispy.readthedocs.io.
Testing helper utility for monitoring calls to functions and methods (spying).
Example
import my_module
import pyispy
def my_ClassA():
reports = []
pyispy.wiretap(my_module.ClassA, ["__init__", "exec"], reports)
obj = my_module.ClassA()
assert "__init__" in reports
TODO
- Refactor hooks as classes to contract input arguments (object, function name,
logbook) to support polymorphic attitude in
process_request
. -
- Implement/test wiretap on magic methods
-
- Handle response to read-only functions (for example
__add__
in int type)
- Handle response to read-only functions (for example
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.