コード例 #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
コード例 #2
0
ファイル: __init__.py プロジェクト: DocHoncho/brownie
 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
コード例 #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
コード例 #4
0
ファイル: progress.py プロジェクト: DocHoncho/brownie
 def get_usable_width(self):
     writer = TerminalWriter(StringIO())
     progressbar = ProgressBar([TextWidget('foobar')], writer)
     Assert(progressbar.get_usable_width()) == writer.get_usable_width() - 6