def test_is_categorical(): """ Check if the given dataset given a columns is categorical or not. :raises AssertionError: { exception_description } """ df = pd.read_csv( os.path.join(os.path.dirname(__file__), 'data', 'Freedman.csv')) check = Check() assert check.is_categorical(df['Location']) == True
def test_is_working(): check = Check() print(check.is_working())
def test_sum_three(): assert Check.sum(100, 100) == 200
def test_sum_two(): assert Check.sum(100, 200) != 30
def test_sum_one(): assert Check.sum(10, 20) == 30
def test_is_not_continuous_2(): df = pd.read_csv( os.path.join(os.path.dirname(__file__), 'data', 'Freedman.csv')) check = Check() assert check.is_continuous(df['population']) == False
def test_is_not_continuous(): df = pd.read_csv( os.path.join(os.path.dirname(__file__), 'data', 'Freedman.csv')) check = Check() assert check.is_continuous(df['nonwhite']) == True
def test_is_not_categorical_1(): df = pd.read_csv( os.path.join(os.path.dirname(__file__), 'data', 'Freedman.csv')) check = Check() assert check.is_categorical(df['density']) == False