def METHOD_NAME(self):
    class Foo(object):
        def __init__(self, x): self.x = x
        def __int__(self): return self. x
    self.assertEqual('1', '%d' % Foo(1))
    self.assertEqual('1', '%d' % Foo(1L)) # __int__ can return a long, but
                                          # it should be accepted too