[pypy-dev] reusing test classess from another module's test directory?
Amaury Forgeot d'Arc
amauryfa at gmail.com
Mon Jun 4 23:09:17 CEST 2012
2012/6/4 <wlavrijsen at lbl.gov>
> What is the recommended way to grab test bases from the test area of
> another
> module? Right now, I'm doing the moderately ugly:
>
> sys.path.append(str(py.path.**local(autopath.pypydir).join('**module',
> 'cpyext', 'test')))
> from test_cpyext import AppTestCpythonExtensionBase
>
> which works fine, but surely there must be a better way?
>
You surely noticed that pypy uses absolute imports everywhere.
Did you try:
from pypy.module.cpyext.test.test_cpyext import
AppTestCpythonExtensionBase
like all test files under pypy/module/cpyext?
--
Amaury Forgeot d'Arc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20120604/950887f1/attachment-0001.html>
More information about the pypy-dev
mailing list