TheNeuralBit commented on a change in pull request #14374:
URL: https://github.com/apache/beam/pull/14374#discussion_r604472970



##########
File path: sdks/python/apache_beam/dataframe/io_test.py
##########
@@ -56,12 +63,14 @@ def temp_dir(self, files=None):
           fout.write(contents)
     return dir + os.path.sep
 
-  def read_all_lines(self, pattern):
+  def read_all_lines(self, pattern, delete=False):
     for path in glob.glob(pattern):
       with open(path) as fin:
         # TODO(Py3): yield from
         for line in fin:
           yield line.rstrip('\n')
+      if delete:

Review comment:
       Thanks, good to know pytest has this. We've also used 
https://docs.python.org/3/library/tempfile.html elsewhere.
   
   In this case I wanted to specifically delete files as we read them so I 
could confirm there are no _other_ files (L344).




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to