# Path: xcessiv/functions.py
# def hash_file(path, block_size=65536):
# def hash_string(string):
# def import_object_from_path(path, object):
# def import_object_from_string_code(code, object):
# def import_string_code_as_module(code):
# def verify_dataset(X, y):
# def is_valid_json(x):
# def make_serializable(json):
# def get_sample_dataset(dataset_properties):
# def verify_estimator_class(est, meta_feature_generator, metric_generators, dataset_properties):
# def get_path_from_query_string(req):
#     def __init__(self, path):
#     def __enter__(self):
#     def __exit__(self, exc_type, exc_val, exc_tb):
# class DBContextManager():
# 
# Path: xcessiv/presets/cvsetting.py



import unittest
from sklearn.datasets import load_iris
from xcessiv import functions
from xcessiv.presets import cvsetting
    def setUp(self):
        self.X, self.y = load_iris(return_X_y=True)

    def test_source(self):
        module = functions.import_string_code_as_module(cvsetting.leave_one_out['source'])
        assert hasattr(module, 'return_splits_iterable')

        list(module.return_splits_iterable(self.X, self.y))

        del module


class TestLeavePOut(unittest.TestCase):
    def setUp(self):
        self.X, self.y = load_iris(return_X_y=True)

    def test_source(self):
        module = functions.import_string_code_as_module(cvsetting.leave_p_out['source'])
        assert hasattr(module, 'return_splits_iterable')

        list(module.return_splits_iterable(self.X, self.y))

        del module


class TestGroupKFold(unittest.TestCase):
    def setUp(self):
        self.X, self.y = load_iris(return_X_y=True)

    def test_source(self):

# Path: xcessiv/functions.py
# def hash_file(path, block_size=65536):
# def hash_string(string):
# def import_object_from_path(path, object):
# def import_object_from_string_code(code, object):
# def import_string_code_as_module(code):
# def verify_dataset(X, y):
# def is_valid_json(x):
# def make_serializable(json):
# def get_sample_dataset(dataset_properties):
# def verify_estimator_class(est, meta_feature_generator, metric_generators, dataset_properties):
# def get_path_from_query_string(req):
#     def __init__(self, path):
#     def __enter__(self):
#     def __exit__(self, exc_type, exc_val, exc_tb):
# class DBContextManager():
# 
# Path: xcessiv/presets/cvsetting.py



# Path: xcessiv/presets/tests/test_cvsetting.py
import unittest
from sklearn.datasets import load_iris
from xcessiv import functions
from xcessiv.presets import cvsetting

    def setUp(self):
        self.X, self.y = load_iris(return_X_y=True)

    def test_source(self):
        module = functions.import_string_code_as_module(cvsetting.leave_one_out['source'])
        assert hasattr(module, 'return_splits_iterable')

        list(module.return_splits_iterable(self.X, self.y))

        del module


class TestLeavePOut(unittest.TestCase):
    def setUp(self):
        self.X, self.y = load_iris(return_X_y=True)

    def test_source(self):
        module = functions.import_string_code_as_module(cvsetting.leave_p_out['source'])
        assert hasattr(module, 'return_splits_iterable')

        list(module.return_splits_iterable(self.X, self.y))

        del module


class TestGroupKFold(unittest.TestCase):
    def setUp(self):
        self.X, self.y = load_iris(return_X_y=True)

    def test_source(self):

        module = functions.import_string_code_as_module(cvsetting.group_k_fold['source'])