From 78f37782ae0de69abb331012f57fb37ba6cf5a4a Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 2 Apr 2020 01:30:20 +0200 Subject: [PATCH] Bypass test_mkdir_with_permission if root --- test/test_filesystem.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/test_filesystem.py b/test/test_filesystem.py index 6eea821f..3e4f45ac 100644 --- a/test/test_filesystem.py +++ b/test/test_filesystem.py @@ -371,6 +371,12 @@ def test_mkdir(tmp_path): def test_mkdir_with_permission(tmp_path, mocker): + + # This test only make sense when not being root + import pdb; pdb.set_trace() + if os.getuid() == 0: + return + new_path = tmp_path / "new_folder" permission = 0o700 mkdir(str(new_path), mode=permission)