Taragolis commented on code in PR #38164:
URL: https://github.com/apache/airflow/pull/38164#discussion_r1525544941
##########
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:
Hm... I think we need specific marker which allow run such tests tests only
in docker/breeze.
One minor changes: test or tested function and it might do some dangerous
action into the developers machine
--
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]