You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/08/17 11:00:01 UTC

[GitHub] [airflow] Taragolis opened a new pull request, #25762: Use temporary directories for tests remote aws loggers

Taragolis opened a new pull request, #25762:
URL: https://github.com/apache/airflow/pull/25762

   During execute tests in IDE I incidentally add in repo log file from tests Cloudwatch handlers. 
   Right now it create files depend on current working directory.
   
   Use native `pytest` temporary directory factory for test Remote AWS Tasks Logs Handlers for preventing this in the future
   
   cc: @potiuk 


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk merged pull request #25762: Use temporary directories for tests remote aws loggers

Posted by GitBox <gi...@apache.org>.
potiuk merged PR #25762:
URL: https://github.com/apache/airflow/pull/25762


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] uranusjr commented on a diff in pull request #25762: Use temporary directories for tests remote aws loggers

Posted by GitBox <gi...@apache.org>.
uranusjr commented on code in PR #25762:
URL: https://github.com/apache/airflow/pull/25762#discussion_r948058995


##########
tests/providers/amazon/aws/log/test_cloudwatch_task_handler.py:
##########
@@ -55,10 +55,10 @@ def logmock():
 class TestCloudwatchTaskHandler:
     @conf_vars({('logging', 'remote_log_conn_id'): 'aws_default'})
     @pytest.fixture(autouse=True)
-    def setup(self, create_log_template):
+    def setup(self, create_log_template, tmpdir_factory):

Review Comment:
   ```suggestion
       def setup(self, create_log_template, tmp_path_factory):
   ```
   
   I believe `tmpdir` and `tmpdir_factory` usages are strongly discouraged now in favour of `tmp_path` and `tmp_path_factory` (which use the stdlib pathlib).



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] Taragolis commented on a diff in pull request #25762: Use temporary directories for tests remote aws loggers

Posted by GitBox <gi...@apache.org>.
Taragolis commented on code in PR #25762:
URL: https://github.com/apache/airflow/pull/25762#discussion_r948069553


##########
tests/providers/amazon/aws/log/test_cloudwatch_task_handler.py:
##########
@@ -55,10 +55,10 @@ def logmock():
 class TestCloudwatchTaskHandler:
     @conf_vars({('logging', 'remote_log_conn_id'): 'aws_default'})
     @pytest.fixture(autouse=True)
-    def setup(self, create_log_template):
+    def setup(self, create_log_template, tmpdir_factory):

Review Comment:
   Awesome! Really missing that `pytest` supports pure `pathlib.Path`



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org