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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Carlos Ramos Carreño
erp5
Commits
e68f5573
Commit
e68f5573
authored
Apr 05, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
py2/py3: use sys.maxsize instead of sys.maxint
!1751 (comment 203735)
parent
5194fa6e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testERP5Catalog.py
...mplateItem/portal_components/test.erp5.testERP5Catalog.py
+2
-0
product/ERP5Type/tests/ERP5TypeTestSuite.py
product/ERP5Type/tests/ERP5TypeTestSuite.py
+1
-1
No files found.
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testERP5Catalog.py
View file @
e68f5573
...
@@ -572,6 +572,7 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
...
@@ -572,6 +572,7 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
# otherwise it returns the object
# otherwise it returns the object
self
.
assertEqual
(
obj
,
portal_catalog
.
getObject
(
obj
.
getUid
()).
getObject
())
self
.
assertEqual
(
obj
,
portal_catalog
.
getObject
(
obj
.
getUid
()).
getObject
())
# but raises KeyError if object is not in catalog
# but raises KeyError if object is not in catalog
self
.
assertRaises
(
KeyError
,
portal_catalog
.
getObject
,
sys
.
maxsize
)
self
.
assertRaises
(
KeyError
,
portal_catalog
.
getObject
,
-
1
)
self
.
assertRaises
(
KeyError
,
portal_catalog
.
getObject
,
-
1
)
def
test_getRecordForUid
(
self
):
def
test_getRecordForUid
(
self
):
...
@@ -584,6 +585,7 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
...
@@ -584,6 +585,7 @@ class TestERP5Catalog(ERP5TypeTestCase, LogInterceptor):
portal_catalog
=
self
.
getCatalogTool
()
portal_catalog
=
self
.
getCatalogTool
()
obj
=
self
.
_makeOrganisation
()
obj
=
self
.
_makeOrganisation
()
self
.
assertEqual
(
obj
.
getPath
(),
portal_catalog
.
getpath
(
obj
.
getUid
()))
self
.
assertEqual
(
obj
.
getPath
(),
portal_catalog
.
getpath
(
obj
.
getUid
()))
self
.
assertRaises
(
KeyError
,
portal_catalog
.
getpath
,
sys
.
maxsize
)
self
.
assertRaises
(
KeyError
,
portal_catalog
.
getpath
,
-
1
)
self
.
assertRaises
(
KeyError
,
portal_catalog
.
getpath
,
-
1
)
def
test_16_newUid
(
self
):
def
test_16_newUid
(
self
):
...
...
product/ERP5Type/tests/ERP5TypeTestSuite.py
View file @
e68f5573
...
@@ -148,7 +148,7 @@ class SavedTestSuite(ERP5TypeTestSuite):
...
@@ -148,7 +148,7 @@ class SavedTestSuite(ERP5TypeTestSuite):
def __init__(self, *args, **kw):
def __init__(self, *args, **kw):
# Use same portal id for all tests run by current instance
# Use same portal id for all tests run by current instance
# but keep it (per-run) random.
# but keep it (per-run) random.
self._portal_id = 'portal_%i' % (random.randint(0,
2**64
), )
self._portal_id = 'portal_%i' % (random.randint(0,
sys.maxsize
), )
self._setup_failed = False
self._setup_failed = False
super(SavedTestSuite, self).__init__(*args, **kw)
super(SavedTestSuite, self).__init__(*args, **kw)
...
...
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