(self)
| 33 | assert record.task_id == '???' |
| 34 | |
| 35 | def test_datefmt(self): |
| 36 | record = logging.LogRecord( |
| 37 | 'name', logging.INFO, 'path', 1, 'hello world', None, None, |
| 38 | ) |
| 39 | x = TaskFormatter( |
| 40 | fmt='[%(asctime)s] %(task_name)s %(message)s', |
| 41 | datefmt='%Y%m%d-%H%M%S', |
| 42 | use_color=False, |
| 43 | ) |
| 44 | assert x.datefmt == '%Y%m%d-%H%M%S' |
| 45 | asctime = x.format(record).split(']')[0].lstrip('[') |
| 46 | # the default asctime uses "-" and ":" separators plus a "," for msecs |
| 47 | assert ':' not in asctime and ',' not in asctime |
| 48 | |
| 49 | |
| 50 | class test_logger_isa: |
nothing calls this directly
no test coverage detected