def test_unimportableConfiguredLogObserver(self):
        """
        C{--logger} with an unimportable module raises a L{UsageError}.
        """
        config = twistd.ServerOptions()
        e = self.assertRaises(
            UsageError, config.parseOptions,
            ['--logger', 'no.such.module.I.hope'])
        self.assertTrue(
            e.args[0].startswith(
                "Logger 'no.such.module.I.hope' could not be imported: "
                "'no.such.module.I.hope' does not name an object"))
        self.assertNotIn('\n', e.args[0])

        C{--logger} with an unimportable module raises a L{UsageError}.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_twistd.py