Author: Alexander Hesse <webmas...@aquanasoft.de>
Branch: split-rpython
Changeset: r59934:a71aef0e6309
Date: 2013-01-10 22:26 +0100
http://bitbucket.org/pypy/pypy/changeset/a71aef0e6309/

Log:    Moved need_sparse_files to test_extfunc

diff --git a/pypy/module/_file/test/test_large_file.py 
b/pypy/module/_file/test/test_large_file.py
--- a/pypy/module/_file/test/test_large_file.py
+++ b/pypy/module/_file/test/test_large_file.py
@@ -12,7 +12,7 @@
 
     def setup_method(self, meth):
         if getattr(meth, 'need_sparse_files', False):
-            from pypy.module.posix.test.test_posix2 import need_sparse_files
+            from rpython.translator.c.test.test_extfunc import 
need_sparse_files
             need_sparse_files()
 
     def test_large_seek_offsets(self):
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
@@ -7,6 +7,7 @@
 from pypy.tool.pytest.objspace import gettestobjspace
 from pypy.conftest import pypydir
 from rpython.rtyper.module.ll_os import RegisterOs
+from rpython.translator.c.test.test_extfunc import need_sparse_files
 import os
 import py
 import sys
@@ -42,11 +43,7 @@
     # Initialize sys.filesystemencoding
     # space.call_method(space.getbuiltinmodule('sys'), 'getfilesystemencoding')
 
-def need_sparse_files():
-    if sys.platform == 'darwin':
-        py.test.skip("no sparse files on default Mac OS X file system")
-    if os.name == 'nt':
-        py.test.skip("no sparse files on Windows")
+
 
 GET_POSIX = "(): import %s as m ; return m" % os.name
 
diff --git a/rpython/translator/c/test/test_extfunc.py 
b/rpython/translator/c/test/test_extfunc.py
--- a/rpython/translator/c/test/test_extfunc.py
+++ b/rpython/translator/c/test/test_extfunc.py
@@ -101,10 +101,15 @@
     f1()
     os.unlink(filename)
 
+def need_sparse_files():
+    if sys.platform == 'darwin':
+        py.test.skip("no sparse files on default Mac OS X file system")
+    if os.name == 'nt':
+        py.test.skip("no sparse files on Windows")
+
 def test_largefile():
     if not hasattr(os, 'ftruncate'):
         py.test.skip("this os has no ftruncate :-(")
-    from pypy.module.posix.test.test_posix2 import need_sparse_files
     need_sparse_files()
     filename = str(udir.join('test_largefile'))
     r4800000000  = r_longlong(4800000000L)
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to