This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2015年05月14日 12:03 by berker.peksag, last changed 2022年04月11日 14:58 by admin.
| Messages (4) | |||
|---|---|---|---|
| msg243182 - (view) | Author: Berker Peksag (berker.peksag) * (Python committer) | Date: 2015年05月14日 12:03 | |
It would be useful if we could change the logging format of assertLogs when we use it:
with self.assertLogs('foo', level='INFO', format='%(message)s') as cm:
logging.getLogger('foo').info('first message')
self.assertEqual(cm.output, ['first message'])
Or maybe with a class attribute like maxDiff:
logFormat = '%(message)s'
|
|||
| msg249032 - (view) | Author: Robert Collins (rbcollins) * (Python committer) | Date: 2015年08月23日 23:51 | |
Parameters please, TestCase has nothing to do with this - it really shouldn't even have the method. |
|||
| msg249042 - (view) | Author: Michael Foord (michael.foord) * (Python committer) | Date: 2015年08月24日 08:54 | |
assertLogs is on a Python test suite helper, not TestCase itself. |
|||
| msg249043 - (view) | Author: Robert Collins (rbcollins) * (Python committer) | Date: 2015年08月24日 09:09 | |
I don't know if or when it was moved, but right now: ./python -m pydoc unittest.case.TestCase.assertLogs ... the docs for it. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:16 | admin | set | github: 68381 |
| 2015年08月24日 09:09:43 | rbcollins | set | messages: + msg249043 |
| 2015年08月24日 08:54:59 | michael.foord | set | messages: + msg249042 |
| 2015年08月23日 23:51:50 | rbcollins | set | messages: + msg249032 |
| 2015年05月14日 12:03:49 | berker.peksag | create | |