Decorator that fails the test if the contents or status of fp changed.
(*fps)
| 88 | |
| 89 | |
| 90 | def assert_no_side_effects(*fps): |
| 91 | """Decorator that fails the test if the contents or status of fp changed.""" |
| 92 | def decorator(f): |
| 93 | @assert_contents_unchanged(*fps) |
| 94 | @assert_status_unchanged(*fps) |
| 95 | @wraps(f) |
| 96 | def wrapper(*args, **kwargs): |
| 97 | f(*args, **kwargs) |
| 98 | return wrapper |
| 99 | return decorator |
| 100 | |
| 101 | |
| 102 | def __assert_decorator(msg, prop, *fps): |
nothing calls this directly
no outgoing calls
no test coverage detected