Exemplo n.º 1
0
 def test_adjust_width_preserves_pos(self):
     progress = progress_model.ProgressModel()
     progress.advance()
     progress.adjust_width(10)
     self.assertProgressSummary(1, 10, progress)
     progress.adjust_width(-10)
     self.assertProgressSummary(1, 0, progress)
Exemplo n.º 2
0
 def test_set_width_adjusts_substack(self):
     progress = progress_model.ProgressModel()
     progress.adjust_width(3)
     progress.advance()
     progress.push()
     progress.set_width(2)
     progress.advance()
     self.assertProgressSummary(3, 6, progress)
Exemplo n.º 3
0
 def test_advance_advances_substack(self):
     progress = progress_model.ProgressModel()
     progress.adjust_width(3)
     progress.advance()
     progress.push()
     progress.adjust_width(1)
     progress.advance()
     self.assertProgressSummary(2, 3, progress)
Exemplo n.º 4
0
 def test_pop_restores_progress(self):
     progress = progress_model.ProgressModel()
     progress.adjust_width(3)
     progress.advance()
     progress.push()
     progress.adjust_width(1)
     progress.advance()
     progress.pop()
     self.assertProgressSummary(1, 3, progress)
Exemplo n.º 5
0
 def test_adjust_width(self):
     progress = progress_model.ProgressModel()
     progress.adjust_width(10)
     self.assertProgressSummary(0, 10, progress)
     progress.adjust_width(-10)
     self.assertProgressSummary(0, 0, progress)
Exemplo n.º 6
0
 def test_set_width_absolute_preserves_pos(self):
     progress = progress_model.ProgressModel()
     progress.advance()
     progress.set_width(2)
     self.assertProgressSummary(1, 2, progress)
Exemplo n.º 7
0
 def test_set_width_absolute(self):
     progress = progress_model.ProgressModel()
     progress.set_width(10)
     self.assertProgressSummary(0, 10, progress)
Exemplo n.º 8
0
 def test_advance_1_0(self):
     progress = progress_model.ProgressModel()
     progress.advance()
     self.assertProgressSummary(1, 0, progress)
Exemplo n.º 9
0
 def test_new_progress_0_0(self):
     progress = progress_model.ProgressModel()
     self.assertProgressSummary(0, 0, progress)