Commit 1f1c1d61 authored by Sebastien Robin's avatar Sebastien Robin

tests: search tests from current file, do not rely on sys.path

parent c1b8fa1a
...@@ -4,6 +4,8 @@ import os, subprocess, re ...@@ -4,6 +4,8 @@ import os, subprocess, re
from test_suite import ERP5TypeTestSuite from test_suite import ERP5TypeTestSuite
import sys import sys
HERE = os.path.dirname(__file__)
class _ERP5(ERP5TypeTestSuite): class _ERP5(ERP5TypeTestSuite):
realtime_output = False realtime_output = False
enabled_product_list = ('CMFActivity', 'CMFCategory', 'ERP5', 'ERP5Catalog', enabled_product_list = ('CMFActivity', 'CMFCategory', 'ERP5', 'ERP5Catalog',
...@@ -29,7 +31,7 @@ class _ERP5(ERP5TypeTestSuite): ...@@ -29,7 +31,7 @@ class _ERP5(ERP5TypeTestSuite):
def _getAllTestList(self): def _getAllTestList(self):
test_list = [] test_list = []
path = sys.path[0] path = "%s/../" % HERE
component_re = re.compile(".*/([^/]+)/TestTemplateItem/portal_components" component_re = re.compile(".*/([^/]+)/TestTemplateItem/portal_components"
"/test\.[^.]+\.([^.]+).py$") "/test\.[^.]+\.([^.]+).py$")
for test_path in ( for test_path in (
......
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