def is_integer(text):
    """ Tests to see if a string contains an integer """
    if text.isdigit():
        return True
    elif text[0] == '-':  # Check for negative numbers
        if text[1:].isdigit():
            return True
    else:
        return False