Skip to content

Commit

Permalink
Extra tests for coverage on different timezones.
Browse files Browse the repository at this point in the history
  • Loading branch information
jamadden committed Aug 9, 2017
1 parent a67d9d4 commit b0267f1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/zope/datetime/tests/test_datetime.py
Expand Up @@ -198,6 +198,11 @@ def i(_):
finally:
datetime.safelocaltime = orig_safelocaltime

def test_calcTimezoneName_multiple_non_fail(self):
dtp = self._makeOne()
dtp._multipleZones = True
self.assertIsNotNone(dtp._calcTimezoneName(100, 1))

def test_parse_noniso_bad_month(self):
with self.assertRaises(datetime.SyntaxError):
self._callParse("2000--31 +1")
Expand Down Expand Up @@ -279,3 +284,8 @@ def test_parse_am_pm(self):

def test_valid_date(self):
self.assertFalse(self._makeOne()._validDate(2000, 0, 12))

def test_localZone_multiple(self):
p = self._makeOne()
p._multipleZones = True
self.assertIsNotNone(p.localZone())

0 comments on commit b0267f1

Please sign in to comment.