MCPcopy Create free account
hub / github.com/gitless-vcs/gitless / assert_no_side_effects

Function assert_no_side_effects

gitless/tests/test_core.py:90–99  ·  view source on GitHub ↗

Decorator that fails the test if the contents or status of fp changed.

(*fps)

Source from the content-addressed store, hash-verified

88
89
90def 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
102def __assert_decorator(msg, prop, *fps):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected