[pypy-commit] pypy statvfs_tests: added tests for os.statvfs and os.fstatvfs.
andrewsmedina
noreply at buildbot.pypy.org
Wed Jul 24 16:16:24 CEST 2013
Author: Andrews Medina <andrewsmedina at gmail.com>
Branch: statvfs_tests
Changeset: r65609:71a9eb74dc81
Date: 2013-07-23 22:20 -0400
http://bitbucket.org/pypy/pypy/changeset/71a9eb74dc81/
Log: added tests for os.statvfs and os.fstatvfs.
diff --git a/rpython/rtyper/module/test/test_ll_os.py b/rpython/rtyper/module/test/test_ll_os.py
--- a/rpython/rtyper/module/test/test_ll_os.py
+++ b/rpython/rtyper/module/test/test_ll_os.py
@@ -46,6 +46,26 @@
data = getllimpl(os.getlogin)()
assert data == expected
+def test_statvfs():
+ if not hasattr(os, 'statvfs'):
+ py.test.skip('posix specific function')
+ try:
+ expected = os.statvfs('.')
+ except OSError, e:
+ py.test.skip("the underlying os.statvfs() failed: %s" % e)
+ data = getllimpl(os.statvfs)('.')
+ assert data == expected
+
+def test_fstatvfs():
+ if not hasattr(os, 'fstatvfs'):
+ py.test.skip('posix specific function')
+ try:
+ expected = os.fstatvfs(0)
+ except OSError, e:
+ py.test.skip("the underlying os.fstatvfs() failed: %s" % e)
+ data = getllimpl(os.fstatvfs)(0)
+ assert data == expected
+
def test_utimes():
if os.name != 'nt':
py.test.skip('Windows specific feature')
More information about the pypy-commit
mailing list