Exemplo n.º 1
0
 def get_usable_width(self):
     writer = TerminalWriter(StringIO(), prefix='spam')
     Assert(writer.get_usable_width()) == writer.get_width() - len('spam')
     writer.indent()
     Assert(writer.get_usable_width()) == writer.get_width() - 8
Exemplo n.º 2
0
 def get_usable_width(self):
     writer = TerminalWriter(StringIO(), prefix='spam')
     Assert(writer.get_usable_width()) == writer.get_width() - len('spam')
     writer.indent()
     Assert(writer.get_usable_width()) == writer.get_width() - 8
Exemplo n.º 3
0
 def get_usable_width(self):
     writer = TerminalWriter(StringIO())
     progressbar = ProgressBar([TextWidget('foobar')], writer)
     Assert(progressbar.get_usable_width()) == writer.get_usable_width() - 6
Exemplo n.º 4
0
 def get_usable_width(self):
     writer = TerminalWriter(StringIO())
     progressbar = ProgressBar([TextWidget('foobar')], writer)
     Assert(progressbar.get_usable_width()) == writer.get_usable_width() - 6