##// END OF EJS Templates
Creates newlines in the %%timeit documentation (#14556)...
Creates newlines in the %%timeit documentation (#14556) Fixes #13873 by adding empty lines after semicolons, rendering blocks correctly. Fixes the issue pointed out by this [comment](https://github.com/ipython/ipython/issues/13873#issuecomment-1363442055) Fixes unintentional bolding in the later part of the same section, by removing indentation: ![image](https://github.com/user-attachments/assets/0200ff8a-6a0d-4250-85d6-ddb94c04725c)

File last commit:

r27509:42e22f8e
r28913:e63a316e merge
Show More
test_logger.py
27 lines | 776 B | text/x-python | PythonLexer
# -*- coding: utf-8 -*-
"""Test IPython.core.logger"""
import os.path
import pytest
from tempfile import TemporaryDirectory
def test_logstart_inaccessible_file():
with pytest.raises(IOError):
_ip.logger.logstart(logfname="/") # Opening that filename will fail.
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
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()