##// END OF EJS Templates
Fix the rest of the colors used on Windows so they are more visible...
Fix the rest of the colors used on Windows so they are more visible This applies a hack similar to the one in 7b7d560822d4e9b6ab486393e22e305c502ff6d1 to change the prompt colors and exception colors so they are more visible as shown in issue #10238 Fixes: #10238

File last commit:

r7115:a8a64ebc
r23317:baeb642e
Show More
test_logger.py
32 lines | 917 B | text/x-python | PythonLexer
Fernando Perez
Add missing encoding declaration to file with unicode in it.
r7115 # -*- coding: utf-8 -*-
Thomas Kluyver
Add test that, if we failed to open the log file, we don't try to write to it.
r3889 """Test IPython.core.logger"""
Thomas Kluyver
Add test for unicode in logging.
r7082 import os.path
Thomas Kluyver
Add test that, if we failed to open the log file, we don't try to write to it.
r3889 import nose.tools as nt
Thomas Kluyver
Add test for unicode in logging.
r7082 from IPython.utils.tempdir import TemporaryDirectory
Thomas Kluyver
Add test that, if we failed to open the log file, we don't try to write to it.
r3889
_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
Thomas Kluyver
Add test for unicode in logging.
r7082
def test_logstart_unicode():
with TemporaryDirectory() as tdir:
logfname = os.path.join(tdir, "test_unicode.log")
_ip.run_cell("'abc€'")
try:
_ip.magic("logstart -to %s" % logfname)
_ip.run_cell("'abc€'")
finally:
_ip.logger.logstop()