def METHOD_NAME(self):
    class FakeGsim(object):
        def __init__(self, arg):
            self.arg = arg
        def init(self):
            pass
        def __repr__(self):
            return '<FakeGsim(%s)>' % self.arg
    registry['FakeGsim'] = FakeGsim
    try:
        gsim = valid.gsim('[FakeGsim]\narg=0.1', '/fake/dir')
        self.assertEqual(repr(gsim), '<FakeGsim(0.1)>')
    finally:
        del registry['FakeGsim']