Commit e21b4582 authored by Jérome Perrin's avatar Jérome Perrin

core_test: adjust upstream DateTime tests

Drop old test adjustments, we only test DateTime >= 3 nowadays.

Make the condition for test_pickle_old_with_micros_as_float based on
python version for simplicity.
parent 4774cfab
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
import os import os
import unittest import unittest
import six
import zodbpickle.fastpickle as pickle import zodbpickle.fastpickle as pickle
from DateTime import DateTime from DateTime import DateTime
...@@ -340,26 +341,14 @@ def test_suite(): ...@@ -340,26 +341,14 @@ def test_suite():
class DateTimeTests(test_datetime.DateTimeTests): class DateTimeTests(test_datetime.DateTimeTests):
testTimezoneNaiveHandling = unittest.expectedFailure( testTimezoneNaiveHandling = unittest.expectedFailure(
test_datetime.DateTimeTests.testTimezoneNaiveHandling) test_datetime.DateTimeTests.testTimezoneNaiveHandling)
# ERP5 never used the pickle format with micros as float if six.PY3:
# https://github.com/zopefoundation/DateTime/pull/62 # ERP5 never used the pickle format with micros as float
test_pickle_old_with_micros_as_float = unittest.expectedFailure( # https://github.com/zopefoundation/DateTime/pull/62
test_datetime.DateTimeTests.test_pickle_old_with_micros_as_float) test_pickle_old_with_micros_as_float = unittest.expectedFailure(
test_datetime.DateTimeTests.test_pickle_old_with_micros_as_float)
# This test is only in DateTime >= 3
if hasattr(test_datetime.DateTimeTests, 'test_intl_format_hyphen'): test_intl_format_hyphen = unittest.expectedFailure(
test_intl_format_hyphen = unittest.expectedFailure( test_datetime.DateTimeTests.test_intl_format_hyphen)
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)) suite.addTest(unittest.makeSuite(DateTimeTests))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment