def contain_same_digit(a, b):
    """
    This function tests whether or not numbers a and b contains the same digits.
    """
    list_a = list(str(a))
    list_b = list(str(b))
    if len(list_a) == len(list_b):
        for elt in list_a:
            if elt not in list_b:
                return False
        return True
    else:
        return False