=== modified file 'test/unittest_fileutils.py' --- test/unittest_fileutils.py 2007-05-14 21:26:45 +0000 +++ test/unittest_fileutils.py 2007-05-14 21:36:23 +0000 @@ -74,6 +74,8 @@ def test_mode_change(self): """tests that mode is changed when needed""" + if not os.geteuid(): + self.skip('this test fails with root privs') # test on non-writable file self.assert_(not os.access(self.rpath, os.W_OK)) wp_file = ProtectedFile(self.rpath, 'w') @@ -85,6 +87,8 @@ def test_restore_on_close(self): """tests original mode is restored on close""" + if not os.geteuid(): + self.skip('this test fails with root privs') # test on non-writable file self.assert_(not os.access(self.rpath, os.W_OK)) ProtectedFile(self.rpath, 'w').close() @@ -96,6 +100,8 @@ def test_mode_change_on_append(self): """tests that mode is changed when file is opened in 'a' mode""" + if not os.geteuid(): + self.skip('this test fails with root privs') self.assert_(not os.access(self.rpath, os.W_OK)) wp_file = ProtectedFile(self.rpath, 'a') self.assert_(os.access(self.rpath, os.W_OK))