@@ -201,43 +201,42 @@ def _assertSplitAtFractionBehavior(
201201 if split_result is not None :
202202 if len (split_result ) != 2 :
203203 raise ValueError ('Split result must be a tuple that contains split '
204- 'position and split fraction. Received: %r' ,
205- split_result )
204+ 'position and split fraction. Received: %r' %
205+ ( split_result ,) )
206206
207207 if range_tracker .stop_position () != split_result [0 ]:
208208 raise ValueError ('After a successful split, the stop position of the '
209209 'RangeTracker must be the same as the returned split '
210210 'position. Observed %r and %r which are different.' ,
211- range_tracker .stop_position (), split_result [0 ])
211+ range_tracker .stop_position () % ( split_result [0 ],) )
212212
213213 if split_fraction < 0 or split_fraction > 1 :
214214 raise ValueError ('Split fraction must be within the range [0,1]' ,
215- 'Observed split fraction was %r.' , split_result [1 ])
215+ 'Observed split fraction was %r.' % ( split_result [1 ],) )
216216
217217 stop_position_after_split = range_tracker .stop_position ()
218218 if split_result and stop_position_after_split == stop_position_before_split :
219219 raise ValueError ('Stop position %r did not change after a successful '
220- 'split of source %r at fraction %r.' ,
221- stop_position_before_split , source , split_fraction )
220+ 'split of source %r at fraction %r.' %
221+ ( stop_position_before_split , source , split_fraction ) )
222222
223223 if expected_outcome == ExpectedSplitOutcome .MUST_SUCCEED_AND_BE_CONSISTENT :
224224 if not split_result :
225225 raise ValueError ('Expected split of source %r at fraction %r to be '
226226 'successful after reading %d elements. But '
227- 'the split failed.' ,
228- source , split_fraction ,
229- num_items_to_read_before_split )
227+ 'the split failed.' %
228+ (source , split_fraction , num_items_to_read_before_split ))
230229 elif expected_outcome == ExpectedSplitOutcome .MUST_FAIL :
231230 if split_result :
232231 raise ValueError ('Expected split of source %r at fraction %r after '
233232 'reading %d elements to fail. But splitting '
234- 'succeeded with result %r.' ,
235- source , split_fraction ,
236- num_items_to_read_before_split , split_result )
233+ 'succeeded with result %r.' %
234+ ( source , split_fraction , num_items_to_read_before_split ,
235+ split_result ) )
237236
238237 elif (expected_outcome !=
239238 ExpectedSplitOutcome .MUST_BE_CONSISTENT_IF_SUCCEEDS ):
240- raise ValueError ('Unknown type of expected outcome: %r' ,
239+ raise ValueError ('Unknown type of expected outcome: %r' %
241240 expected_outcome )
242241 current_items .extend ([value for value in reader_iter ])
243242
0 commit comments