Passing another test. Fixed the separator to be any character
This commit is contained in:
parent
f611e90e5c
commit
0d1acd12d4
2 changed files with 9 additions and 4 deletions
|
|
@ -1262,6 +1262,11 @@ class datetime(date):
|
|||
"""
|
||||
return self._tzinfo
|
||||
|
||||
@property
|
||||
def fold(self):
|
||||
"""Fold."""
|
||||
return self._fold
|
||||
|
||||
# Class methods
|
||||
|
||||
# pylint: disable=protected-access
|
||||
|
|
@ -1311,8 +1316,10 @@ class datetime(date):
|
|||
Valid format is ``YYYY-MM-DD[*HH[:MM[:SS[.fff[fff]]]][+HH:MM[:SS[.ffffff]]]]``
|
||||
|
||||
"""
|
||||
if "T" in date_string:
|
||||
date_string, time_string = date_string.split("T")
|
||||
time_string = None
|
||||
if len(date_string) > 10:
|
||||
time_string = date_string[11:]
|
||||
date_string = date_string[:10]
|
||||
dateval = date.fromisoformat(date_string)
|
||||
timeval = time.fromisoformat(time_string)
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -1033,8 +1033,6 @@ class TestDateTime(TestDate):
|
|||
self.assertIsInstance(dt, DateTimeSubclass)
|
||||
self.assertEqual(dt.extra, 7)
|
||||
|
||||
# TODO
|
||||
@unittest.skip("timezone not implemented")
|
||||
def test_fromisoformat_datetime(self):
|
||||
# Test that isoformat() is reversible
|
||||
base_dates = [(1, 1, 1), (1900, 1, 1), (2004, 11, 12), (2017, 5, 30)]
|
||||
|
|
|
|||
Loading…
Reference in a new issue