# Path: insults/util.py
# def make_sure_path_exists(path):
# def data_file(category, name=None):
# def data_directory(category):
# def log_file(name):
# def save_folds(folds):
# def saved_folds():
# def save_model( clf, location=SAVEFILE_LOCATION ):
# def load_model( location=SAVEFILE_LOCATION, model_filename=MODEL_FILENAME):
# def get_parser():
# def tied_rank(x):
# def auc(actual, posterior):
# def score():
# SAVEFILE_LOCATION = "models/stored/"
# MODEL_FILENAME = "insult_classifier.joblib.pkl"


import pytest
import numpy as np
from numpy.testing import assert_equal, assert_array_almost_equal, assert_almost_equal
from insults import util



def test_data_file():
    path = util.data_file("test_category")
    path_two = util.data_file("test_category", name="test_name")

    assert path == 'insults/data/test_category'
    assert path_two == 'insults/data/test_category/test_name'

def test_data_directory():
    path = util.data_file("test_category")

    assert path == 'insults/data/test_category'

def test_log_file():

# Path: insults/util.py
# def make_sure_path_exists(path):
# def data_file(category, name=None):
# def data_directory(category):
# def log_file(name):
# def save_folds(folds):
# def saved_folds():
# def save_model( clf, location=SAVEFILE_LOCATION ):
# def load_model( location=SAVEFILE_LOCATION, model_filename=MODEL_FILENAME):
# def get_parser():
# def tied_rank(x):
# def auc(actual, posterior):
# def score():
# SAVEFILE_LOCATION = "models/stored/"
# MODEL_FILENAME = "insult_classifier.joblib.pkl"


# Path: tests/test_util.py
import pytest
import numpy as np
from numpy.testing import assert_equal, assert_array_almost_equal, assert_almost_equal
from insults import util




def test_data_file():
    path = util.data_file("test_category")
    path_two = util.data_file("test_category", name="test_name")

    assert path == 'insults/data/test_category'
    assert path_two == 'insults/data/test_category/test_name'

def test_data_directory():
    path = util.data_file("test_category")

    assert path == 'insults/data/test_category'

def test_log_file():

    log_f = util.log_file("test_name")