From 1148149ebdbfa80dbe5c0848b4e428cd13f70b80 Mon Sep 17 00:00:00 2001 From: Jason Madden Date: Mon, 7 Aug 2017 09:55:18 -0500 Subject: [PATCH] Fix a test that depended on the current date. --- src/zope/datetime/tests/test_datetime.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/zope/datetime/tests/test_datetime.py b/src/zope/datetime/tests/test_datetime.py index 009d9ec..4a8ff38 100644 --- a/src/zope/datetime/tests/test_datetime.py +++ b/src/zope/datetime/tests/test_datetime.py @@ -14,6 +14,7 @@ # pylint:disable=protected-access import unittest +import time from zope import datetime class TestCache(unittest.TestCase): @@ -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],