Exemplo 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'
Exemplo 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'
Exemplo n.º 3
0
 def repr(self):
     widget = Widget()
     Assert(repr(widget)) == 'Widget()'
Exemplo 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)
Exemplo 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)