# 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/learnersetting.py



import unittest
from sklearn.datasets import load_iris, load_boston
from xcessiv import functions
from xcessiv.presets import learnersetting
            'xgboost_regressor',
        ]

    def test_learner_settings(self):
        for key in self.regressor_settings:
            setting = getattr(learnersetting, key)
            module = functions.import_string_code_as_module(
                setting['source']
            )

            assert hasattr(module.base_learner, 'get_params')
            assert hasattr(module.base_learner, 'set_params')
            assert hasattr(module.base_learner, 'fit')
            assert hasattr(module.base_learner, setting['meta_feature_generator'])

            module.base_learner.fit(self.X, self.y)

            del module


class TestTransformers(unittest.TestCase):
    def setUp(self):
        self.X, self.y = load_boston(return_X_y=True)
        self.transformer_settings = [
            'identity_transformer'
        ]

    def test_learner_settings(self):
        for key in self.transformer_settings:
            setting = getattr(learnersetting, key)

# 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/learnersetting.py



# Path: xcessiv/presets/tests/test_learnersetting.py
import unittest
from sklearn.datasets import load_iris, load_boston
from xcessiv import functions
from xcessiv.presets import learnersetting

            'xgboost_regressor',
        ]

    def test_learner_settings(self):
        for key in self.regressor_settings:
            setting = getattr(learnersetting, key)
            module = functions.import_string_code_as_module(
                setting['source']
            )

            assert hasattr(module.base_learner, 'get_params')
            assert hasattr(module.base_learner, 'set_params')
            assert hasattr(module.base_learner, 'fit')
            assert hasattr(module.base_learner, setting['meta_feature_generator'])

            module.base_learner.fit(self.X, self.y)

            del module


class TestTransformers(unittest.TestCase):
    def setUp(self):
        self.X, self.y = load_boston(return_X_y=True)
        self.transformer_settings = [
            'identity_transformer'
        ]

    def test_learner_settings(self):
        for key in self.transformer_settings:
            setting = getattr(learnersetting, key)

            module = functions.import_string_code_as_module(