Author: Andrews Medina <andrewsmed...@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') _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit