示例#1
0
 def child(kind):
     t = TestTerminal(kind=kind, stream=StringIO(), force_styling=True)
     with t.location(0, 0):
         pass
     expected_output = u''.join(
         (unicode_cap('sc'), unicode_parm('cup', 0, 0), unicode_cap('rc')))
     assert (t.stream.getvalue() == expected_output)
示例#2
0
 def child_with_styling(kind):
     t = TestTerminal(kind=kind, stream=StringIO(), force_styling=True)
     with t.location(3, 4):
         t.stream.write(u'hi')
     expected_output = u''.join(
         (unicode_cap('sc'), unicode_parm('cup', 4,
                                          3), u'hi', unicode_cap('rc')))
     assert (t.stream.getvalue() == expected_output)
 def child(kind):
     t = TestTerminal(kind=kind, stream=StringIO(), force_styling=True)
     with t.location(0, 0):
         pass
     expected_output = u''.join(
         (unicode_cap('sc'),
          unicode_parm('cup', 0, 0),
          unicode_cap('rc')))
     assert (t.stream.getvalue() == expected_output)
 def child_with_styling(kind):
     t = TestTerminal(kind=kind, stream=StringIO(), force_styling=True)
     with t.location(3, 4):
         t.stream.write(u'hi')
     expected_output = u''.join(
         (unicode_cap('sc'),
          unicode_parm('cup', 4, 3),
          u'hi', unicode_cap('rc')))
     assert (t.stream.getvalue() == expected_output)
 def child():
     assert TestTerminal().cup(3, 4) == unicode_parm('cup', 3, 4)
 def on_color(t, num):
     return t.number_of_colors and unicode_parm('setab', num) or ''
示例#7
0
 def child():
     assert TestTerminal().cup(3, 4) == unicode_parm('cup', 3, 4)
示例#8
0
 def on_color(t, num):
     return t.number_of_colors and unicode_parm('setab', num) or ''