示例#1
0
 def test_worktime_getter(self):
     wd = Workday(2021, 2, 1)
     wd.start_time = 7, 0
     wd.end_time = 15, 30
     self.assertEqual(timedelta(hours=8, minutes=30), wd.worktime)
示例#2
0
 def test_worktime_no_end_time(self):
     wd = Workday(2021, 2, 1)
     wd.start_time = 15, 30
     self.assertEqual(timedelta(), wd.worktime)
示例#3
0
 def test_start_date_setter(self):
     wd = Workday(2021, 2, 1)
     wd.start_time = 7, 0
     self.assertEqual(datetime(2021, 2, 1, 7, 0), wd.start_time)