コード例 #1
0
 def test_wraps_arg_in_colour(self):
     stream = ColourDecorator(StringIO())
     stream.write('{*}', colour=termstyle.italic)
     stream.stream.getvalue() | should | be_equal_to(
         termstyle.italic('{*}'))
コード例 #2
0
 def test_wraps_arg_in_colour(self):
     stream = ColourDecorator(StringIO())
     stream.write('{*}', colour=termstyle.italic)
     stream.stream.getvalue() |should| be_equal_to(
         termstyle.italic('{*}'))
コード例 #3
0
 def test_writes_arg_unchanged_without_colour(self):
     stream = ColourDecorator(StringIO())
     stream.write('{*}')
     stream.stream.getvalue() | should | be_equal_to('{*}')
コード例 #4
0
 def test_writes_arg_unchanged_without_colour(self):
     stream = ColourDecorator(StringIO())
     stream.write('{*}')
     stream.stream.getvalue() |should| be_equal_to('{*}')