Taragolis commented on code in PR #38164:
URL: https://github.com/apache/airflow/pull/38164#discussion_r1525569832


##########
tests/utils/test_log_handlers.py:
##########
@@ -754,3 +754,15 @@ def test_permissions_for_new_directories():
             os.umask(old_umask)
     finally:
         shutil.rmtree(tmp_path)
+
+
+def test_permissions_for_home_directory_subdir():
+    home_dir = Path.home()
+    for dir in home_dir.glob("*"):
+        if dir.is_dir():
+            with patch("pathlib.Path.chmod") as mock_chmod:
+                _change_directory_permissions_up(dir, 0o000)
+                # Should only be called once - for the subdir - but not for 
the home directory
+                mock_chmod.assert_called_once_with(0o000)
+            return
+    pytest.fail("No directory found in home directory")

Review Comment:
   > I believe we had one in the past - but can't find it easily
   
   Yeah I've also look that recently, without any luck.



-- 
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]

Reply via email to