'Check that type T coerces correctly with subclasses of itself.'

def check_type_coercions(self, T):

    assert (T is not bool)
    self.assertIs(statistics._coerce(T, T), T)
    class U(T, ):
        pass
    class V(T, ):
        pass
    class W(U, ):
        pass
    for typ in (U, V, W):
        self.assertCoerceTo(T, typ)
    self.assertCoerceTo(U, W)
    self.assertCoerceRaises(U, V)
    self.assertCoerceRaises(V, W)
