##// END OF EJS Templates
add pre/post-save hooks...
add pre/post-save hooks - `ContentsManager.pre_save_hook` runs on the path and model with content - `FileContentsManager.post_save_hook` runs on the filesystem path and model without content - use pre_save_hook for things like stripping output - use post_save_hook for things like nbconvert --to python

File last commit:

r15516:43a46eb6
r19299:cf989ee0
Show More
test_decorators.py
9 lines | 170 B | text/x-python | PythonLexer
Thomas Kluyver
Add tests for things in utils
r15516 from IPython.utils import decorators
def test_flag_calls():
@decorators.flag_calls
def f():
pass
assert not f.called
f()
assert f.called