Commit e62741b7 authored by Nicolas Dumazet's avatar Nicolas Dumazet

Wrap runUnitTest when used from a buildout.

This is needed to run Unit tests using TemplateTool


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29601 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a1ac3431
...@@ -71,7 +71,13 @@ Options: ...@@ -71,7 +71,13 @@ Options:
def getUnitTestFile(): def getUnitTestFile():
"""returns the absolute path of this script. """returns the absolute path of this script.
This is used by template tool to run unit tests.""" This is used by template tool to run unit tests."""
return os.path.abspath(__file__) # ERP5_TEST_RUNNER is set when the instance was created by a buildout
# It should point to a wrapper to this script setting up the necessary paths
test_runner = os.environ.get('ERP5_TEST_RUNNER')
if test_runner is not None and os.path.exists(test_runner):
return test_runner
else:
return os.path.abspath(__file__)
def initializeInstanceHome(tests_framework_home, def initializeInstanceHome(tests_framework_home,
......
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