Exemple #1
0
 def test_13(self):
     out_stringio = StringIO()
     generated_rest = _generate_rest(
       [(3, '\n'),
        (3, 'comment\n'),
        (3, '\n')], out_stringio)
     assert (out_stringio.getvalue() == div(1.5, -3) + '\ncomment\n\n' + div_end)
Exemple #2
0
    def test_12(self):
        out_stringio = StringIO()
        generated_rest = _generate_rest([(0, '\n'), (0, 'comment\n'),
                                         (0, '\n')], out_stringio)
        assert (out_stringio.getvalue() == sl(-3) + """
comment

""")
Exemple #3
0
 def test_11(self):
     out_stringio = StringIO()
     generated_rest = _generate_rest([(-1, '\n'), (-1, 'code\n'),
                                      (-1, '\n')], out_stringio)
     assert (
         out_stringio.getvalue() ==
         # Note: Not using a """ string, since the string trailing whitespace option in
         # Enki would remove some of the one-space lines.
         bf + ' \n'
         ' code\n' + ' \n' + ef)
Exemple #4
0
    def test_12(self):
        out_stringio = StringIO()
        generated_rest = _generate_rest(
          [(0, '\n'),
           (0, 'comment\n'),
           (0, '\n')], out_stringio)
        assert (out_stringio.getvalue() == sl(-3) +
"""
comment

""")
Exemple #5
0
 def test_11(self):
     out_stringio = StringIO()
     generated_rest = _generate_rest(
       [(-1, '\n'),
        (-1, 'code\n'),
        (-1, '\n')], out_stringio)
     assert (out_stringio.getvalue() ==
       # Note: Not using a """ string, since the string trailing whitespace option in
       # Enki would remove some of the one-space lines.
       bf +
       ' \n'
       ' code\n' +
       ' \n' +
       ef)
Exemple #6
0
 def test_13(self):
     out_stringio = StringIO()
     generated_rest = _generate_rest([(3, '\n'), (3, 'comment\n'),
                                      (3, '\n')], out_stringio)
     assert (out_stringio.getvalue() == div(1.5, -3) + '\ncomment\n\n' +
             div_end)