Author: Ronny Pfannschmidt <[email protected]>
Branch: kill-import_from_lib_pypy
Changeset: r55879:d58c3a5bbe0d
Date: 2012-07-01 13:57 +0200
http://bitbucket.org/pypy/pypy/changeset/d58c3a5bbe0d/
Log: fix the rest of the rebuild using tests
diff --git a/lib_pypy/pypy_test/test_resource.py
b/lib_pypy/pypy_test/test_resource.py
--- a/lib_pypy/pypy_test/test_resource.py
+++ b/lib_pypy/pypy_test/test_resource.py
@@ -1,10 +1,15 @@
from __future__ import absolute_import
from lib_pypy.ctypes_config_cache import rebuild
-rebuild.rebuild_one('resource.ctc.py')
+from pypy.tool.lib_pypy import ctypes_cachedir, rebuild_one
-from lib_pypy import resource
+
+def setup_module(mod):
+ # Generates the resource cache
+ rebuild_one(ctypes_cachedir.join('resource.ctc.py'))
+
def test_resource():
+ from lib_pypy import resource
x = resource.getrusage(resource.RUSAGE_SELF)
assert len(x) == 16
assert x[0] == x[-16] == x.ru_utime
diff --git a/lib_pypy/pypy_test/test_syslog.py
b/lib_pypy/pypy_test/test_syslog.py
--- a/lib_pypy/pypy_test/test_syslog.py
+++ b/lib_pypy/pypy_test/test_syslog.py
@@ -1,11 +1,12 @@
from __future__ import absolute_import
# XXX very minimal test
+from pypy.tool.lib_pypy import ctypes_cachedir, rebuild_one
-from lib_pypy.ctypes_config_cache import rebuild
-rebuild.rebuild_one('syslog.ctc.py')
-
-from lib_pypy import syslog
+def setup_module(mod):
+ # Generates the resource cache
+ rebuild_one(ctypes_cachedir.join('syslog.ctc.py'))
def test_syslog():
+ from lib_pypy import syslog
assert hasattr(syslog, 'LOG_ALERT')
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit