def test_requireModuleImportError(self):
        """
        When module import fails with ImportError it returns the specified
        default value.
        """
        for name in ['nosuchmtopodule', 'no.such.module']:
            default = object()

            result = reflect.requireModule(name, default=default)

            self.assertIs(result, default)

        When module import fails with ImportError it returns the specified
        default value.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_reflect.py