Browse Source

Refs #30990 -- Added test for 'z' date format with a leap year.

Baptiste Mispelon 5 years ago
parent
commit
18e10740a4
1 changed files with 3 additions and 0 deletions
  1. 3 0
      tests/utils_tests/test_dateformat.py

+ 3 - 0
tests/utils_tests/test_dateformat.py

@@ -116,6 +116,9 @@ class DateFormatTests(SimpleTestCase):
         the_future = datetime(2100, 10, 25, 0, 00)
         self.assertEqual(dateformat.format(the_future, r'Y'), '2100')
 
+    def test_day_of_year_leap(self):
+        self.assertEqual(dateformat.format(datetime(2000, 12, 31), 'z'), '366')
+
     def test_timezones(self):
         my_birthday = datetime(1979, 7, 8, 22, 00)
         summertime = datetime(2005, 10, 30, 1, 00)