##// END OF EJS Templates
Merge pull request #921 from minrk/traiterror...
Merge pull request #921 from minrk/traiterror Show invalid config message on TraitErrors during initialization. implemented via `@catch_config` decorator Now, the event that was triggered by invalid app config (see `--log-level 5`) is triggered by bad config at any point during initialization. This *will* catch TraitError-raising bugs in IPython itself, but only during initialization. Also, deregister crash handler on use to avoid it being triggered recursively/repeatedly.

File last commit:

r3889:13fdc81c
r5216:6fb30aea merge
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