예제 #1
0
 def test_percent_complete_property(self):
     reader_progress = ReaderProgress(percent_complete=0.5)
     self.assertEqual(reader_progress.percent_complete, 0.5)
예제 #2
0
 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)
예제 #3
0
 def test_position_property(self):
     reader_progress = ReaderProgress(position=ReaderPosition())
     self.assertEqual(type(reader_progress.position), ReaderPosition)
예제 #4
0
 def test_valid_progress_type(self):
     DynamicSplitRequest(progress=ReaderProgress())