viable/strict/1789540965: Update handler clearance logic (#196102)
- PyTorch: 1034 events in the last 90 days
- PyTorch: 1023th Release in the last 90 days
- Previous: earlier the same day · trunk/136a65c6f464a7cafd418a9c680f731b97878e36
What happened
The tests, when run in shards, use pytest. So, pytest test_logging.py is used instead of python test_logging.py . The initial code, which was: for log_qname in log_internal . log_registry . get_log_qnames (): logger = logging . getLogger ( log_qname ) created_handlers . update ( logger . handlers ) self . assertEqual ( len ( logger . handlers ), 2 , f" { log_qname } should only have stream and file handlers" , ) che…
Summary assembled by rule from the sources below