Skip to content

Commit

Permalink
Fix a test that depended on the current date.
Browse files Browse the repository at this point in the history
  • Loading branch information
jamadden committed Aug 7, 2017
1 parent 58c5128 commit 1148149
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/zope/datetime/tests/test_datetime.py
Expand Up @@ -14,6 +14,7 @@
# pylint:disable=protected-access
import unittest

import time
from zope import datetime

class TestCache(unittest.TestCase):
Expand Down Expand Up @@ -236,9 +237,11 @@ def test_parse_multiple_ints(self):
self.assertEqual(result[:-1],
(2000, 1, 10, 0, 0, 0))

# This one takes "32" as the year, and has nothing for day or month.
# Therefore it overrides day, month, and year with the current values
result = self._call_parse("10 32 12")
self.assertEqual(result[:-1],
(2017, 8, 3, 0, 0, 0))
time.localtime()[:3] + (0, 0, 0))

result = self._call_parse("13 32 12")
self.assertEqual(result[:-1],
Expand Down

0 comments on commit 1148149

Please sign in to comment.