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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Rafael Monnerat
erp5
Commits
b990a75a
Commit
b990a75a
authored
Dec 18, 2022
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5TypeTestCase: backport python3 assertion method names
so that we can run 2to3.fix_assert
parent
cd1b212d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
product/ERP5Type/tests/ERP5TypeTestCase.py
product/ERP5Type/tests/ERP5TypeTestCase.py
+9
-0
No files found.
product/ERP5Type/tests/ERP5TypeTestCase.py
View file @
b990a75a
...
...
@@ -679,6 +679,15 @@ class ERP5TypeTestCaseMixin(ProcessingNodeTestCase, PortalTestCase):
self
.
assertEqual
(
method
(),
reference_workflow_state
)
return
workflow_error_message
# BBB backport methods from python3.
# We use this tricky getattr syntax so that lib2to3.fixers.fix_asserts
# do not fix this code.
if
six
.
PY2
:
def
assertRaisesRegex
(
self
,
*
args
,
**
kwargs
):
return
getattr
(
self
,
'assertRaisesRegexp'
)(
*
args
,
**
kwargs
)
def
assertRegex
(
self
,
*
args
,
**
kwargs
):
return
getattr
(
self
,
'assertRegexpMatches'
)(
*
args
,
**
kwargs
)
def
stepPdb
(
self
,
sequence
=
None
,
sequence_list
=
None
):
"""Invoke debugger"""
try
:
# try ipython if available
...
...
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