Commit b32c6e8b authored by Jérome Perrin's avatar Jérome Perrin

Initialize the test instance home only when this script is executed, not imported

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35489 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5cd76d74
...@@ -258,8 +258,6 @@ instance_home = os.path.join(real_instance_home, 'unit_test') ...@@ -258,8 +258,6 @@ instance_home = os.path.join(real_instance_home, 'unit_test')
real_tests_home = os.path.join(real_instance_home, 'tests') real_tests_home = os.path.join(real_instance_home, 'tests')
tests_home = os.path.join(instance_home, 'tests') tests_home = os.path.join(instance_home, 'tests')
initializeInstanceHome(tests_framework_home, real_instance_home, instance_home)
class ERP5TypeTestLoader(unittest.TestLoader): class ERP5TypeTestLoader(unittest.TestLoader):
"""Load test cases from the name passed on the command line. """Load test cases from the name passed on the command line.
...@@ -667,6 +665,8 @@ def main(): ...@@ -667,6 +665,8 @@ def main():
os.environ["zeo_server"] = arg os.environ["zeo_server"] = arg
elif opt == "--zserver": elif opt == "--zserver":
os.environ["zserver"] = arg os.environ["zserver"] = arg
initializeInstanceHome(tests_framework_home, real_instance_home, instance_home)
result = runUnitTestList(test_list=args, result = runUnitTestList(test_list=args,
verbosity=verbosity, verbosity=verbosity,
......
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