def test_subsecond_timestamp(self): # Add 2 events in <1s task = DummyTask() self.run_task(task) task_record = six.advance_iterator(self.history.find_all_by_name('DummyTask')) print(task_record.events) self.assertEqual(task_record.events[0].event_name, DONE)
def test_subsecond_timestamp(self): # Add 2 events in <1s task = DummyTask() self.run_task(task) task_record = six.advance_iterator( self.history.find_all_by_name('DummyTask')) print(task_record.events) self.assertEqual(task_record.events[0].event_name, DONE)
def test_utc_conversion(self): from luigi.server import from_utc task = DummyTask() self.run_task(task) task_record = six.advance_iterator(self.history.find_all_by_name('DummyTask')) last_event = task_record.events[0] try: print(from_utc(str(last_event.ts))) except ValueError: self.fail("Failed to convert timestamp {} to UTC".format(last_event.ts))
def test_utc_conversion(self): from luigi.server import from_utc task = DummyTask() self.run_task(task) task_record = six.advance_iterator( self.history.find_all_by_name('DummyTask')) last_event = task_record.events[0] try: print(from_utc(str(last_event.ts))) except ValueError: self.fail("Failed to convert timestamp {} to UTC".format( last_event.ts))