Skip to content

Commit 580c9d5

Browse files
authored
Merge pull request #829 from stefanor/check-euid
Skip test_unwriteable when tests are run as root
2 parents 36f3e3b + 184ff0f commit 580c9d5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/ansible/tests/target_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ def test_file_exists(self):
8686
self.assertFalse(self.func(bleh))
8787
self.assertEquals(open(bleh).read(), 'derp')
8888

89+
@unittest2.skipIf(
90+
os.geteuid() == 0, 'writes by root ignore directory permissions')
8991
def test_unwriteable(self):
9092
with NamedTemporaryDirectory() as temp_path:
9193
os.chmod(temp_path, 0)

0 commit comments

Comments
 (0)