def test_WEEKDAY_error(self): sample_date = date.DATE(2008, 2, 14) serial_number = int(sample_date) self.assertIsInstance(date.WEEKDAY(serial_number, 0), xlerrors.NumExcelError) self.assertIsInstance(date.WEEKDAY(serial_number, 4), xlerrors.NumExcelError) self.assertIsInstance(date.WEEKDAY(serial_number, 5), xlerrors.NumExcelError) self.assertIsInstance(date.WEEKDAY(serial_number, 6), xlerrors.NumExcelError) self.assertIsInstance(date.WEEKDAY(serial_number, 7), xlerrors.NumExcelError) self.assertIsInstance(date.WEEKDAY(serial_number, 8), xlerrors.NumExcelError) self.assertIsInstance(date.WEEKDAY(serial_number, 9), xlerrors.NumExcelError) self.assertIsInstance(date.WEEKDAY(serial_number, 10), xlerrors.NumExcelError) self.assertIsInstance(date.WEEKDAY(serial_number, 18), xlerrors.NumExcelError)
def test_WEEKDAY_return_type_17(self): sample_date = date.DATE(2008, 2, 14) serial_number = int(sample_date) self.assertEqual(date.WEEKDAY(serial_number, 17), 5)