Esempio n. 1
0
 def update(self):
     writer = TerminalWriter(StringIO())
     progressbar = ProgressBar([], writer)
     widget = Widget()
     with Assert.raises(NotImplementedError) as exc:
         widget.update(progressbar, writer.get_width())
     Assert(exc.args[0]) == 'Widget.update'
Esempio n. 2
0
 def update(self):
     writer = TerminalWriter(StringIO())
     progressbar = ProgressBar([], writer)
     widget = Widget()
     with Assert.raises(NotImplementedError) as exc:
         widget.update(progressbar, writer.get_width())
     Assert(exc.args[0]) == 'Widget.update'
Esempio n. 3
0
 def repr(self):
     widget = Widget()
     Assert(repr(widget)) == 'Widget()'
Esempio n. 4
0
 def size_hint(self):
     writer = TerminalWriter(StringIO())
     progressbar = ProgressBar([], writer)
     widget = Widget()
     assert not widget.provides_size_hint
     Assert(widget.size_hint(progressbar)).is_(None)
Esempio n. 5
0
 def size_hint(self):
     writer = TerminalWriter(StringIO())
     progressbar = ProgressBar([], writer)
     widget = Widget()
     assert not widget.provides_size_hint
     Assert(widget.size_hint(progressbar)).is_(None)