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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sebastien Robin
erp5
Commits
01d10932
Commit
01d10932
authored
Jan 18, 2023
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testDateUtils: run some original DateTime tests with our patches loaded
This ensures that we don't break more.
parent
ba286114
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testDateUtils.py
...TemplateItem/portal_components/test.erp5.testDateUtils.py
+31
-0
No files found.
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testDateUtils.py
View file @
01d10932
...
...
@@ -309,4 +309,35 @@ def test_suite():
suite
.
addTest
(
unittest
.
makeSuite
(
TestPinDateTime
))
suite
.
addTest
(
unittest
.
makeSuite
(
TestTimeZoneContext
))
suite
.
addTest
(
unittest
.
makeSuite
(
TestDateTimePatch
))
# also run original tests from DateTime module
# pylint:disable=no-name-in-module
try
:
import
DateTime.tests.testDateTime
as
test_datetime
except
ImportError
:
from
DateTime.tests
import
test_datetime
# pylint:enable=no-name-in-module
class
DateTimeTests
(
test_datetime
.
DateTimeTests
):
testTimezoneNaiveHandling
=
unittest
.
expectedFailure
(
test_datetime
.
DateTimeTests
.
testTimezoneNaiveHandling
)
# This test is only in DateTime >= 3
if
hasattr
(
test_datetime
.
DateTimeTests
,
'test_intl_format_hyphen'
):
test_intl_format_hyphen
=
unittest
.
expectedFailure
(
test_datetime
.
DateTimeTests
.
test_intl_format_hyphen
)
# These 3 tests are only in DateTime 2
if
hasattr
(
test_datetime
.
DateTimeTests
,
'test_pickle_new_with_micros'
):
test_pickle_new_with_micros
=
unittest
.
expectedFailure
(
test_datetime
.
DateTimeTests
.
test_pickle_new_with_micros
)
if
hasattr
(
test_datetime
.
DateTimeTests
,
'test_pickle_new_with_tz'
):
test_pickle_new_with_tz
=
unittest
.
expectedFailure
(
test_datetime
.
DateTimeTests
.
test_pickle_new_with_tz
)
if
hasattr
(
test_datetime
.
DateTimeTests
,
'testLegacyTimezones'
):
testLegacyTimezones
=
unittest
.
expectedFailure
(
test_datetime
.
DateTimeTests
.
testLegacyTimezones
)
suite
.
addTest
(
unittest
.
makeSuite
(
DateTimeTests
))
return
suite
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