From 2ba9ec34560d33a5dc7ef801eba2287920752809 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 21 Feb 2009 17:16:56 +0100 Subject: [PATCH] More generator tests. --- tests/test_markup.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/test_markup.py b/tests/test_markup.py index cd6de5614..f0fbcf9e8 100644 --- a/tests/test_markup.py +++ b/tests/test_markup.py @@ -80,39 +80,39 @@ def test_inline(): # correct interpretation of code with whitespace _html = ('

' 'code   sample

') - verify('``code sample``', _html, '\\code{code sample}') - verify(':samp:`code sample`', _html, '\\samp{code sample}') + yield verify, '``code sample``', _html, '\\code{code sample}' + yield verify, ':samp:`code sample`', _html, '\\samp{code sample}' # interpolation of braces in samp and file roles (HTML only) - verify(':samp:`a{b}c`', + yield (verify, ':samp:`a{b}c`', '

a' 'b' 'c

', '\\samp{abc}') # interpolation of arrows in menuselection - verify(':menuselection:`a --> b`', + yield (verify, ':menuselection:`a --> b`', u'

a \N{TRIANGULAR BULLET} b

', '\\emph{a \\(\\rightarrow\\) b}') # non-interpolation of dashes in option role - verify_re(':option:`--with-option`', - '

--with-option

$', - r'\\emph{\\texttt{-{-}with-option}}$') + yield (verify_re, ':option:`--with-option`', + '

--with-option

$', + r'\\emph{\\texttt{-{-}with-option}}$') # verify smarty-pants quotes - verify('"John"', '

“John”

', "``John''") + yield verify, '"John"', '

“John”

', "``John''" # ... but not in literal text - verify('``"John"``', + yield (verify, '``"John"``', '

' '"John"

', '\\code{"John"}') def test_latex_escaping(): # correct escaping in normal mode - verify(u'Γ\\\\∞$', None, ur'\(\Gamma\)\textbackslash{}\(\infty\)\$') + yield verify, u'Γ\\\\∞$', None, ur'\(\Gamma\)\textbackslash{}\(\infty\)\$' # in verbatim code fragments - verify(u'::\n\n @Γ\\∞$[]', None, + yield (verify, u'::\n\n @Γ\\∞$[]', None, u'\\begin{Verbatim}[commandchars=@\\[\\]]\n' u'@PYGZat[]@(@Gamma@)\\@(@infty@)@$@PYGZlb[]@PYGZrb[]\n' u'\\end{Verbatim}')