[Zope] How to access the content of a file in a test suite in a portable way
Israel Saeta Pérez
dukebody at gmail.com
Thu Sep 18 10:12:24 EDT 2008
On Thu, Sep 18, 2008 at 4:16 AM, Marco Bizzarri
<marco.bizzarri at gmail.com> wrote:
> Thanks, Peter; but that does not work inside a test case run as:
>
> python tests/testMyTestSuite.py
>
>
> I'm using at the moment:
>
>
> def product_prefix(self):
> return sys.modules['Products.MyProduct'].__path__[0]
>
>
> but I'm not sure if it is an horrible hack or now.
What about yourmodule.__file__ ?
-- Israel
More information about the Zope
mailing list