uranusjr commented on code in PR #33453:
URL: https://github.com/apache/airflow/pull/33453#discussion_r1298053164
##########
tests/providers/google/cloud/transfers/test_sql_to_gcs.py:
##########
@@ -557,7 +557,7 @@ def
test__write_local_data_files_csv_does_not_write_on_empty_rows(self):
with pytest.raises(StopIteration):
next(files)["file_handle"]
- assert len([f for f in files]) == 0
+ assert not list(files)
Review Comment:
```suggestion
with pytest.raises(StopIteration):
next(files)
```
Alternative approach. Shouldn’t be too much difference in practice
(especially in a test).
##########
tests/providers/google/cloud/transfers/test_sql_to_gcs.py:
##########
@@ -557,7 +557,7 @@ def
test__write_local_data_files_csv_does_not_write_on_empty_rows(self):
with pytest.raises(StopIteration):
next(files)["file_handle"]
- assert len([f for f in files]) == 0
+ assert not list(files)
Review Comment:
```suggestion
with pytest.raises(StopIteration):
next(files)
```
Alternative approach. Shouldn’t be too much difference in practice
(especially in a test).
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]