def test_adjust_width_preserves_pos(self): progress = ProgressModel() progress.advance() progress.adjust_width(10) self.assertProgressSummary(1, 10, progress) progress.adjust_width(-10) self.assertProgressSummary(1, 0, progress)
def test_set_width_adjusts_substack(self): progress = ProgressModel() progress.adjust_width(3) progress.advance() progress.push() progress.set_width(2) progress.advance() self.assertProgressSummary(3, 6, progress)
def test_advance_advances_substack(self): progress = ProgressModel() progress.adjust_width(3) progress.advance() progress.push() progress.adjust_width(1) progress.advance() self.assertProgressSummary(2, 3, progress)
def test_pop_restores_progress(self): progress = ProgressModel() progress.adjust_width(3) progress.advance() progress.push() progress.adjust_width(1) progress.advance() progress.pop() self.assertProgressSummary(1, 3, progress)
def test_adjust_width(self): progress = ProgressModel() progress.adjust_width(10) self.assertProgressSummary(0, 10, progress) progress.adjust_width(-10) self.assertProgressSummary(0, 0, progress)
def test_set_width_absolute_preserves_pos(self): progress = ProgressModel() progress.advance() progress.set_width(2) self.assertProgressSummary(1, 2, progress)
def test_set_width_absolute(self): progress = ProgressModel() progress.set_width(10) self.assertProgressSummary(0, 10, progress)
def test_advance_1_0(self): progress = ProgressModel() progress.advance() self.assertProgressSummary(1, 0, progress)
def test_new_progress_0_0(self): progress = ProgressModel() self.assertProgressSummary(0, 0, progress)