##// END OF EJS Templates
%reset now takes optional in/out/dhist/array args...
%reset now takes optional in/out/dhist/array args this functionality used to live in extensions/clearcmd.py, and in PR #1309, due to the fact that we already had a %clear magic for resetting the screen, it was decided that it'd be best to incorporate the functionality inside the %reset magic.

File last commit:

r3889:13fdc81c
r5965:e37887a2
Show More
test_logger.py
19 lines | 517 B | text/x-python | PythonLexer
"""Test IPython.core.logger"""
import nose.tools as nt
_ip = get_ipython()
def test_logstart_inaccessible_file():
try:
_ip.logger.logstart(logfname="/") # Opening that filename will fail.
except IOError:
pass
else:
nt.assert_true(False) # The try block should never pass.
try:
_ip.run_cell("a=1") # Check it doesn't try to log this
finally:
_ip.logger.log_active = False # If this fails, don't let later tests fail