Commit 47d56184 authored by Alexandre Boeglin's avatar Alexandre Boeglin

Included $INSTANCE_HOME/lib/pyhton in sys.path when launching tests. This

allows to keep the same environment as the zope instance running at the same
location (for example, inhibiting psyco to be able to use pdb).

Added a note about the inclusion of tests_framework_home in sys.path . This
should be removed as soon as possible.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7594 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1d75e4cc
......@@ -94,9 +94,14 @@ def runUnitTestList(test_list) :
products_home = os.path.join(instance_home, 'Products')
from glob import glob
product_test_list = glob(products_home + os.sep + '*' + os.sep + 'tests')
sys.path += product_test_list
sys.path.extend(product_test_list)
sys.path.extend((real_tests_home, tests_home))
# Make sure that locally overridden python modules are used
sys.path.insert(0, os.path.join(real_instance_home, 'lib%spython' % os.sep))
# XXX Allowing to load modules from here is a wrong idea. use the above path
# instead.
# Add tests_framework_home as first path element.
# this allows to bypass psyco by creating a dummy psyco module
# it is then possible to run the debugger by "import pdb; pdb.set_trace()"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment