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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Aurélien Vermylen
erp5
Commits
7d39f342
Commit
7d39f342
authored
Mar 01, 2012
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use fail() instead of raising AssertionError in ZODB Component tests.
parent
95f3f8f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
product/ERP5Type/tests/testDynamicClassGeneration.py
product/ERP5Type/tests/testDynamicClassGeneration.py
+5
-5
No files found.
product/ERP5Type/tests/testDynamicClassGeneration.py
View file @
7d39f342
...
@@ -1276,8 +1276,8 @@ class _TestZodbComponent(SecurityTestCase):
...
@@ -1276,8 +1276,8 @@ class _TestZodbComponent(SecurityTestCase):
except
ImportError
:
except
ImportError
:
pass
pass
else
:
else
:
raise
AssertionError
(
"Component '%s' should not have been generated"
%
\
self
.
fail
(
"Component '%s' should not have been generated"
%
\
full_module_name
)
full_module_name
)
def
assertModuleImportable
(
self
,
module_name
):
def
assertModuleImportable
(
self
,
module_name
):
full_module_name
=
self
.
_getComponentFullModuleName
(
module_name
)
full_module_name
=
self
.
_getComponentFullModuleName
(
module_name
)
...
@@ -1286,8 +1286,8 @@ class _TestZodbComponent(SecurityTestCase):
...
@@ -1286,8 +1286,8 @@ class _TestZodbComponent(SecurityTestCase):
__import__
(
full_module_name
,
fromlist
=
[
self
.
_getComponentModuleName
()],
__import__
(
full_module_name
,
fromlist
=
[
self
.
_getComponentModuleName
()],
level
=
0
)
level
=
0
)
except
ImportError
:
except
ImportError
:
raise
AssertionError
(
"Component '%s' should have been generated"
%
\
self
.
fail
(
"Component '%s' should have been generated"
%
\
full_module_name
)
full_module_name
)
def
testValidateInvalidate
(
self
):
def
testValidateInvalidate
(
self
):
"""
"""
...
@@ -1721,7 +1721,7 @@ class TestZodbExtensionComponent(_TestZodbComponent):
...
@@ -1721,7 +1721,7 @@ class TestZodbExtensionComponent(_TestZodbComponent):
self
.
assertEquals
(
e
.
message
,
self
.
assertEquals
(
e
.
message
,
'external method could not be called because it is None'
)
'external method could not be called because it is None'
)
else
:
else
:
raise
AssertionError
(
"TestExternalMethod should not be callable"
)
self
.
fail
(
"TestExternalMethod should not be callable"
)
from
Products.ERP5Type.Core.DocumentComponent
import
DocumentComponent
from
Products.ERP5Type.Core.DocumentComponent
import
DocumentComponent
...
...
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