@@ -344,7 +344,7 @@ class TestCase(BaseTestCase):
344344 batch : int
345345 output_prefix_length : int
346346 has_binary_data : bool
347- _input_data_fd : Optional [MmapableIO ]
347+ _input_data_io : Optional [MmapableIO ]
348348 _generated : Optional [Tuple [MmapableIO , bytes ]]
349349
350350 def __init__ (self , count : int , batch_no : int , config : ConfigNode , problem : Problem ):
@@ -356,7 +356,7 @@ def __init__(self, count: int, batch_no: int, config: ConfigNode, problem: Probl
356356 self .output_prefix_length = config .output_prefix_length
357357 self .has_binary_data = config .binary_data
358358 self ._generated = None
359- self ._input_data_fd = None
359+ self ._input_data_io = None
360360
361361 def _normalize (self , data : bytes ) -> bytes :
362362 # Perhaps the correct answer may be 'no output', in which case it'll be
@@ -454,16 +454,16 @@ def _run_generator(self, gen: Union[str, ConfigNode], args: Optional[Iterable[st
454454 parse_helper_file_error (proc , executor , 'generator' , stderr , time_limit , memory_limit )
455455
456456 def input_data (self ) -> bytes :
457- return self .input_data_fd ().to_bytes ()
457+ return self .input_data_io ().to_bytes ()
458458
459- def input_data_fd (self ) -> MmapableIO :
460- if self ._input_data_fd :
461- return self ._input_data_fd
459+ def input_data_io (self ) -> MmapableIO :
460+ if self ._input_data_io :
461+ return self ._input_data_io
462462
463- result = self ._input_data_fd = self ._make_input_data_fd ()
463+ result = self ._input_data_io = self ._make_input_data_io ()
464464 return result
465465
466- def _make_input_data_fd (self ) -> MmapableIO :
466+ def _make_input_data_io (self ) -> MmapableIO :
467467 gen = self .config .generator
468468
469469 # don't try running the generator if we specify an output file explicitly,
@@ -516,15 +516,15 @@ def checker(self) -> partial:
516516
517517 def free_data (self ) -> None :
518518 self ._generated = None
519- if self ._input_data_fd :
520- self ._input_data_fd .close ()
519+ if self ._input_data_io :
520+ self ._input_data_io .close ()
521521
522522 def __str__ (self ) -> str :
523523 return f'TestCase(in={ self .config ["in" ]} ,out={ self .config ["out" ]} ,points={ self .config ["points" ]} )'
524524
525525 # FIXME(tbrindus): this is a hack working around the fact we can't pickle these fields, but we do need parts of
526526 # TestCase itself on the other end of the IPC.
527- _pickle_blacklist = ('_generated' , 'config' , 'problem' , '_input_data_fd ' )
527+ _pickle_blacklist = ('_generated' , 'config' , 'problem' , '_input_data_io ' )
528528
529529 def __getstate__ (self ) -> dict :
530530 k = {k : v for k , v in self .__dict__ .items () if k not in self ._pickle_blacklist }
0 commit comments