Commit b1280ca8 authored by Vincent Pelletier's avatar Vincent Pelletier

Factorise code.

Code generating code also looks nicer when factorised...
parent 6942cce9
......@@ -243,14 +243,16 @@ initialization =
import Zope2
os.environ['SOFTWARE_HOME'] = os.path.abspath(os.path.dirname(os.path.dirname(Zope2.__file__)))
os.environ['ZOPE_SCRIPTS'] = ''
temp_bt5_path_list = ['/'.join(['''${buildout:parts-directory}''', x, 'bt5']) for x in '''${erp5_repository_list:repository_id_list}'''.split()]
parts_directory = '''${buildout:parts-directory}'''
repository_id_list = '''${erp5_repository_list:repository_id_list}'''.split()
temp_bt5_path_list = ['/'.join([parts_directory, x, 'bt5']) for x in repository_id_list]
bt5_path_list = []
[bt5_path_list.extend([bt5_path, '%s/*' % bt5_path]) for bt5_path in temp_bt5_path_list]
os.environ['erp5_tests_bt5_path'] = ','.join(bt5_path_list)
sys.path[0:0] = ['/'.join(['''${buildout:parts-directory}''', x, 'tests']) for x in '''${erp5_repository_list:repository_id_list}'''.split()]
sys.path[0:0] = ['/'.join([parts_directory, x, 'tests']) for x in repository_id_list]
import glob
product_test_path_list = []
[product_test_path_list.extend(glob.glob('/'.join(['''${buildout:parts-directory}''', x, 'product/*/tests']))) for x in '''${erp5_repository_list:repository_id_list}'''.split()]
[product_test_path_list.extend(glob.glob('/'.join([parts_directory, x, 'product/*/tests']))) for x in repository_id_list]
sys.path[0:0] = product_test_path_list
[test_suite_runner]
......
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