(self)
| 510 | b"of 'asyncio.py' as the module name", err) |
| 511 | |
| 512 | def test_dash_m_init_traceback(self): |
| 513 | # These were wrapped in an ImportError and tracebacks were |
| 514 | # suppressed; see Issue 14285 |
| 515 | exceptions = (ImportError, AttributeError, TypeError, ValueError) |
| 516 | for exception in exceptions: |
| 517 | exception = exception.__name__ |
| 518 | init = "raise {0}('Exception in __init__.py')".format(exception) |
| 519 | with self.subTest(exception), \ |
| 520 | self.setup_test_pkg(init) as pkg_dir: |
| 521 | err = self.check_dash_m_failure('test_pkg') |
| 522 | self.assertIn(exception.encode('ascii'), err) |
| 523 | self.assertIn(b'Exception in __init__.py', err) |
| 524 | self.assertIn(b'Traceback', err) |
| 525 | |
| 526 | def test_dash_m_main_traceback(self): |
| 527 | # Ensure that an ImportError's traceback is reported |
nothing calls this directly
no test coverage detected