Author: Alex Gaynor <alex.gay...@gmail.com> Branch: Changeset: r65610:82c39b75f8a5 Date: 2013-07-24 07:15 -0700 http://bitbucket.org/pypy/pypy/changeset/82c39b75f8a5/
Log: Merged in andrewsmedina/numpypy/statvfs_tests (pull request #166) added some 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