def test_loadTimeErrors(self):
        """
        Load-time errors are reported like normal errors.
        """
        test = runner.TestLoader().loadByName('doesntexist')
        test.run(self.result)
        output = self.stream.getvalue()
        # Just check that 'doesntexist' is in the output, rather than
        # assembling the expected stack trace.
        self.assertIn(b'doesntexist', output)

        Load-time errors are reported like normal errors.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/trial/test/test_reporter.py