def METHOD_NAME(self):
    m = ModuleType('foo')
    # Yes, a class not an instance.
    m.__loader__ = BareLoader
    module_repr = repr(BareLoader)
    self.assertEqual(
        repr(m), "<module 'foo' ({})>".format(module_repr))