diff --git a/sdks/python/apache_beam/io/fileio_test.py b/sdks/python/apache_beam/io/fileio_test.py index 1c650653804c..3bb250a34bd2 100644 --- a/sdks/python/apache_beam/io/fileio_test.py +++ b/sdks/python/apache_beam/io/fileio_test.py @@ -366,13 +366,6 @@ def test_without_deduplication(self): file = self._create_temp_file(dir=tempdir) # Add file twice, since it will be matched for every interval files += [file, file] - # Add file name that will be created mid-pipeline - files.append(FileSystems.join(tempdir, 'extra')) - - def _create_extra_file(element): - writer = FileSystems.create(FileSystems.join(tempdir, 'extra')) - writer.close() - return element.path with TestPipeline() as p: match_continiously = ( @@ -383,8 +376,7 @@ def _create_extra_file(element): has_deduplication=False, start_timestamp=start, stop_timestamp=stop) - | beam.Map(_create_extra_file)) - + | beam.Map(lambda element: element.path)) assert_that(match_continiously, equal_to(files)) def test_match_updated_files(self):