Show More
@@ -62,8 +62,8 b' class Logger(object):' | |||
|
62 | 62 | |
|
63 | 63 | logmode = property(_get_mode,_set_mode) |
|
64 | 64 | |
|
65 | def logstart(self,logfname=None,loghead=None,logmode=None, | |
|
66 | log_output=False,timestamp=False,log_raw_input=False): | |
|
65 | def logstart(self, logfname=None, loghead=None, logmode=None, | |
|
66 | log_output=False, timestamp=False, log_raw_input=False): | |
|
67 | 67 | """Generate a new log-file with a default header. |
|
68 | 68 | |
|
69 | 69 | Raises RuntimeError if the log has already been started""" |
@@ -1,6 +1,9 b'' | |||
|
1 | 1 | """Test IPython.core.logger""" |
|
2 | 2 | |
|
3 | import os.path | |
|
4 | ||
|
3 | 5 | import nose.tools as nt |
|
6 | from IPython.utils.tempdir import TemporaryDirectory | |
|
4 | 7 | |
|
5 | 8 | _ip = get_ipython() |
|
6 | 9 | |
@@ -16,4 +19,13 b' def test_logstart_inaccessible_file():' | |||
|
16 | 19 | _ip.run_cell("a=1") # Check it doesn't try to log this |
|
17 | 20 | finally: |
|
18 | 21 | _ip.logger.log_active = False # If this fails, don't let later tests fail |
|
19 | ||
|
22 | ||
|
23 | def test_logstart_unicode(): | |
|
24 | with TemporaryDirectory() as tdir: | |
|
25 | logfname = os.path.join(tdir, "test_unicode.log") | |
|
26 | _ip.run_cell("'abc€'") | |
|
27 | try: | |
|
28 | _ip.magic("logstart -to %s" % logfname) | |
|
29 | _ip.run_cell("'abc€'") | |
|
30 | finally: | |
|
31 | _ip.logger.logstop() |
General Comments 0
You need to be logged in to leave comments.
Login now