Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Coopdevs OCB mirror
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coopdevs
Odoo
Coopdevs OCB mirror
Commits
4abde337
Commit
4abde337
authored
11 years ago
by
Xavier Morel
Browse files
Options
Downloads
Patches
Plain Diff
[IMP] always print a recap of found test modules before running the tests
bzr revid: xmo@openerp.com-20131106130743-xpy9i34b5xceo8ee
parent
6906d24e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openerpcommand/run_tests.py
+8
-8
8 additions, 8 deletions
openerpcommand/run_tests.py
with
8 additions
and
8 deletions
openerpcommand/run_tests.py
+
8
−
8
View file @
4abde337
...
...
@@ -63,8 +63,8 @@ def get_test_modules(module, submodule, explode):
ms
=
submodules
elif
submodule
==
'
__fast_suite__
'
:
# `suite` was used before the 6.1 release instead of `fast_suite`.
ms
=
fast_suite
if
fast_suite
else
getattr
(
m
,
'
suite
'
,
None
)
if
ms
is
None
:
ms
=
fast_suite
if
hasattr
(
m
,
'
fast_suite
'
)
else
getattr
(
m
,
'
suite
'
,
None
)
if
not
ms
:
if
explode
:
print
'
The module `%s` has no defined test suite.
'
%
(
module
,)
show_submodules_and_exit
()
...
...
@@ -72,7 +72,7 @@ def get_test_modules(module, submodule, explode):
ms
=
[]
elif
submodule
==
'
__sanity_checks__
'
:
ms
=
checks
if
ms
is
None
:
if
not
ms
:
if
explode
:
print
'
The module `%s` has no defined sanity checks.
'
%
(
module
,)
show_submodules_and_exit
()
...
...
@@ -135,7 +135,11 @@ def run(args):
else
:
test_modules
=
get_test_modules
(
module
,
submodule
,
explode
=
True
)
# Run the test suite.
print
'
Test modules:
'
for
test_module
in
test_modules
:
print
'
'
,
test_module
.
__name__
print
if
not
args
.
dry_run
:
suite
=
unittest2
.
TestSuite
()
for
test_module
in
test_modules
:
...
...
@@ -143,10 +147,6 @@ def run(args):
r
=
unittest2
.
TextTestRunner
(
verbosity
=
2
).
run
(
suite
)
if
r
.
errors
or
r
.
failures
:
sys
.
exit
(
1
)
else
:
print
'
Test modules:
'
for
test_module
in
test_modules
:
print
'
'
,
test_module
.
__name__
def
add_parser
(
subparsers
):
parser
=
subparsers
.
add_parser
(
'
run-tests
'
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment