[pypy-svn] pypy default: Skip this test if os.mknod() always requires being root, as it
arigo
commits-noreply at bitbucket.org
Sun Dec 26 17:45:01 CET 2010
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r40229:09352cd720ff
Date: 2010-12-26 17:44 +0100
http://bitbucket.org/pypy/pypy/changeset/09352cd720ff/
Log: Skip this test if os.mknod() always requires being root, as it seems
to be the case e.g. on Mac OS X.
diff --git a/pypy/module/posix/test/test_posix2.py b/pypy/module/posix/test/test_posix2.py
--- a/pypy/module/posix/test/test_posix2.py
+++ b/pypy/module/posix/test/test_posix2.py
@@ -679,8 +679,12 @@
def test_mknod(self):
import stat
os = self.posix
- # not very useful: os.mknod() without specifying 'mode'
- os.mknod(self.path2 + 'test_mknod-1')
+ # os.mknod() may require root priviledges to work at all
+ try:
+ # not very useful: os.mknod() without specifying 'mode'
+ os.mknod(self.path2 + 'test_mknod-1')
+ except OSError, e:
+ skip("os.mknod(): got %r" % (e,))
st = os.lstat(self.path2 + 'test_mknod-1')
assert stat.S_ISREG(st.st_mode)
# os.mknod() with S_IFIFO
More information about the Pypy-commit
mailing list