##// END OF EJS Templates
semantic names for indicator icons...
semantic names for indicator icons For all of the discussion that we had about what kind of icons should and should not be used to indicate what mode the notebook is in, we never went through to make it possible to override it. With this change, it is now possible to override what icons are displayed for Command and Edit Modes. For example, @minrk liked the fighter-jet icon for Command Mode, so he can put this in his custom.css .ipython-command-mode:before { content: "\f0fb"; }

File last commit:

r13593:544353be
r15806:6b3b303a
Show More
test_latex.py
43 lines | 1.5 KiB | text/x-python | PythonLexer
Jonathan Frederic
Add new filter tests
r11902 """
Module with tests for Latex
"""
#-----------------------------------------------------------------------------
# Copyright (c) 2013, the IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------
from ...tests.base import TestsBase
MinRK
remove strip_math_space...
r12864 from ..latex import escape_latex
Jonathan Frederic
Add new filter tests
r11902
#-----------------------------------------------------------------------------
# Class
#-----------------------------------------------------------------------------
class TestLatex(TestsBase):
def test_escape_latex(self):
Jonathan Frederic
Shrink header comments
r11934 """escape_latex test"""
Jonathan Frederic
Add new filter tests
r11902 tests = [
MinRK
update text_escape_latex
r12065 (r'How are \you doing today?', r'How are \textbackslash{}you doing today?'),
(r'\escapechar=`\A\catcode`\|=0 |string|foo', r'\textbackslash{}escapechar=`\textbackslash{}A\textbackslash{}catcode`\textbackslash{}|=0 |string|foo'),
(r'# $ % & ~ _ ^ \ { }', r'\# \$ \% \& \textasciitilde{} \_ \^{} \textbackslash{} \{ \}'),
Jonathan Frederic
Fixed latex test to reflect removal of ansi strip
r12077 ('...', r'\ldots'),
Jonathan Frederic
Add new filter tests
r11902 ('','')]
for test in tests:
Thomas Kluyver
Remove ParametricTestCase from nbconvert tests
r12373 self._try_escape_latex(test[0], test[1])
Jonathan Frederic
Add new filter tests
r11902
def _try_escape_latex(self, test, result):
Jonathan Frederic
Shrink header comments
r11934 """Try to remove latex from string"""
Jonathan Frederic
Use IPython parameterized testing
r11936 self.assertEqual(escape_latex(test), result)