def test_percent_complete_property(self): reader_progress = ReaderProgress(percent_complete=0.5) self.assertEqual(reader_progress.percent_complete, 0.5)
def test_out_of_bounds_percent_complete(self): with self.assertRaises(ValueError): ReaderProgress(percent_complete=-0.1) with self.assertRaises(ValueError): ReaderProgress(percent_complete=1.1)
def test_position_property(self): reader_progress = ReaderProgress(position=ReaderPosition()) self.assertEqual(type(reader_progress.position), ReaderPosition)
def test_valid_progress_type(self): DynamicSplitRequest(progress=ReaderProgress())