'Assert that the given object is an instance of a new-style class and
that there are no classic classes in the inheritance hierarchy of
that class.
This is a beneficial condition because PyPy is better able to
optimize attribute lookup on such classes.'

def assertFullyNewStyle(self, instance):

    self.assertIsInstance(instance, object)
    mro = inspect.getmro(type(instance))
    for subclass in mro:
        self.assertTrue(issubclass(subclass, object), ('%r    is    not    new-style' % (subclass,)))
