Пример #1
0
 def test_month_difference(self):
     self.assertEqual(days_between((2014, 1, 1), (2014, 8, 27)), 238,
                      "Case 2")
Пример #2
0
 def test_full_datetime(self):
     self.assertEqual(days_between((1991, 1, 1, 0, 0), (1992, 1, 1, 0, 0)),
                      365, "Case 8")
Пример #3
0
 def test_days_difference(self):
     self.assertEqual(days_between((1982, 4, 19), (1982, 4, 22)), 3,
                      "Case 1")
Пример #4
0
 def test_year_and_month(self):
     self.assertEqual(days_between((2020, 5), (2020, 6)), 31, "Case 7")
Пример #5
0
 def test_incorrect_argument(self):
     self.assertRaises(TypeError, days_between("", ""))
Пример #6
0
 def test_only_year(self):
     self.assertEqual(days_between((2001, ), (2000, )), 366, "Case 5")
Пример #7
0
 def test_list_arg(self):
     self.assertEqual(days_between([1982, 4, 19], [1982, 4, 22]), 3,
                      "Case 4")
Пример #8
0
 def test_reversed_args(self):
     self.assertEqual(days_between((2014, 8, 27), (2014, 1, 1)), 238,
                      "Case 3")