Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
8a402790
Commit
8a402790
authored
May 26, 2011
by
Nicolas Delaby
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests is a plural form and it is deprecated.
add backward compatibility support
parent
1291b287
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
product/ERP5Type/tests/runTestSuite.py
product/ERP5Type/tests/runTestSuite.py
+15
-9
No files found.
product/ERP5Type/tests/runTestSuite.py
View file @
8a402790
...
...
@@ -5,17 +5,23 @@ from ERP5TypeTestSuite import ERP5TypeTestSuite
def
makeSuite
(
node_quantity
=
None
,
test_suite
=
None
,
revision
=
None
,
db_list
=
None
):
# BBB tests (plural form) is only checked for backward compatibility
for
k
in
sys
.
modules
.
keys
():
if
k
==
'tests'
or
k
.
startswith
(
'tests
.'
):
if
k
in
(
'tests'
,
'test'
,)
or
k
.
startswith
(
'tests.'
)
or
k
.
startswith
(
'test
.'
):
del
sys
.
modules
[
k
]
module_name
,
class_name
=
(
'tests.'
+
\
test_suite
).
rsplit
(
'.'
,
1
)
singular_succeed
=
True
while
True
:
module_name
,
class_name
=
(
'%s.%s'
%
(
singular_succeed
and
'test'
or
'tests'
,
test_suite
)).
rsplit
(
'.'
,
1
)
try
:
suite_class
=
getattr
(
__import__
(
module_name
,
None
,
None
,
[
class_name
]),
class_name
)
except
(
AttributeError
,
ImportError
):
if
not
singular_succeed
:
raise
singular_succeed
=
False
else
:
break
suite
=
suite_class
(
revision
=
revision
,
max_instance_count
=
node_quantity
,
mysql_db_list
=
db_list
.
split
(
','
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment