palladium.tests package

Submodules

palladium.tests.conftest module

palladium.tests.test_R module

class palladium.tests.test_R.TestAbstractModel

Bases: object

test_fit_with_numpy_data(Model, data)
test_fit_with_pandas_data(Model, dataframe)
class palladium.tests.test_R.TestClassification

Bases: object

test_fit_and_predict(dataset, model)
test_fit_and_score(dataset, model)
class palladium.tests.test_R.TestClassificationModel

Bases: palladium.tests.test_R.TestAbstractModel

test_predict_with_numpy_data(Model, data)
test_predict_with_pandas_data(Model, dataframe)
class palladium.tests.test_R.TestClassificationWithNumpyDataset

Bases: palladium.tests.test_R.TestClassification

class palladium.tests.test_R.TestClassificationWithPandasDataset

Bases: palladium.tests.test_R.TestClassification

class palladium.tests.test_R.TestDatasetLoader

Bases: object

test_it(DatasetLoader)

palladium.tests.test_cache module

class palladium.tests.test_cache.TestDiskCache

Bases: object

test_it(diskcache)
test_it_ignore(diskcache)
test_it_no_compute_key(diskcache)
class palladium.tests.test_cache.TestPickleDiskCache

Bases: palladium.tests.test_cache.TestDiskCache

palladium.tests.test_dataset module

class palladium.tests.test_dataset.TestSQL

Bases: object

test_concurrency(sql)
test_it(sql)
test_ndarray_false(sql)
class palladium.tests.test_dataset.TestScheduledDatasetLoader

Bases: object

test_call(process_store, loader)
test_call_custom_value(process_store, loader)
test_update_cache(loader)
class palladium.tests.test_dataset.TestTable

Bases: object

test_it(Table)
test_ndarray_false(Table)
test_no_slice(Table)
test_table_no_target(Table)
palladium.tests.test_dataset.test_empty_dataset_loader()

palladium.tests.test_eval module

class palladium.tests.test_eval.TestList

Bases: object

test(list)
class palladium.tests.test_eval.TestTest

Bases: object

test_test(test)
test_test_no_score(test)

palladium.tests.test_fit module

class palladium.tests.test_fit.TestFit

Bases: object

test_activate_no_persist(fit, dataset_loader)
test_evaluate_annotations(fit, dataset_loader)
test_evaluate_no_test_dataset(fit)
test_evaluate_with_test_dataset(fit)
test_it(fit)
test_no_persist(fit)
test_persist_if_better_than(fit, dataset_loader)
test_persist_if_better_than_false(fit, dataset_loader)
test_persist_if_better_than_no_dataset_test(fit, dataset_loader)
test_persist_if_better_than_persist_false(fit, dataset_loader)
test_timestamp(fit, dataset_loader)
class palladium.tests.test_fit.TestGridSearch

Bases: object

test_it(grid_search)
test_no_score_method_raises(grid_search)
palladium.tests.test_fit.test_activate()
palladium.tests.test_fit.test_delete()

palladium.tests.test_interfaces module

class palladium.tests.test_interfaces.TestAnnotate

Bases: object

test_with_existing_data(annotate)
test_without_existing_data(annotate)
class palladium.tests.test_interfaces.TestPredictError

Bases: object

test_str(PredictError)

palladium.tests.test_julia module

class palladium.tests.test_julia.TestAbstractModel

Bases: object

test_fit(model)
test_fit_with_label_encoder(model)
test_getstate(model)
test_initialize_julia(model, bridge)
test_predict(model)
test_predict_convert_to_float(model)
test_predict_with_label_encoder(model)
test_setstate(model, bridge)
class palladium.tests.test_julia.TestClassificationModel

Bases: palladium.tests.test_julia.TestAbstractModel

test_score(model)

palladium.tests.test_persistence module

class palladium.tests.test_persistence.Dummy(**kwargs)

Bases: object

class palladium.tests.test_persistence.TestCachedUpdatePersister

Bases: object

test_dont_cache(process_store, CachedUpdatePersister, config)
test_proxy_activate(CachedUpdatePersister)
test_proxy_delete(CachedUpdatePersister)
test_proxy_list_models(CachedUpdatePersister)
test_proxy_list_properties(CachedUpdatePersister)
test_proxy_upgrade(CachedUpdatePersister)
test_read(process_store, persister)
test_read_custom_value(process_store, persister)
test_update_cache(persister)
test_update_cache_rrule(process_store, CachedUpdatePersister, config)
test_write(persister)
class palladium.tests.test_persistence.TestDatabase

Bases: object

test_activate(database, dbmodel)
test_concurrent_read_write(database, dbmodel)
test_delete(database, dbmodel)
test_initialize_properties(database)
test_list_models_no_entries(database)
test_list_models_with_existing_entry(database, dbmodel)
test_list_models_with_two_entries(database, dbmodel)
test_read(database, dbmodel)
test_read_activated_model_missing(database, dbmodel)
test_read_no_active_model(database, dbmodel)
test_read_no_model(database)
test_read_with_version(database, dbmodel)
test_table_postfix(Database, request)
test_upgrade_1_0(database, dbmodel)
test_upgrade_from_version(database)
test_upgrade_no_args(database)
test_write_no_entry(database)
test_write_with_existing_entry(database, dbmodel)
class palladium.tests.test_persistence.TestDatabaseCLOB

Bases: palladium.tests.test_persistence.TestDatabase

class palladium.tests.test_persistence.TestFile

Bases: object

test_activate(File)
test_activate_bad_version(File)
test_delete(File)
test_delete_bad_version(File)
test_init_path_without_version(File)
test_list_models_no_metadata(File)
test_list_models_with_metadata(File)
test_list_properties_no_metadata(File)
test_list_properties_with_metadata(File)
test_read(File)
test_read_activated_model_missing(File)
test_read_md(File)
test_read_md_no_file(File)
test_read_no_active_model(File)
test_read_no_model(File)
test_read_no_model_with_given_version(File)
test_read_with_version(File)
test_update_md(File)
test_update_metadata(File)
test_upgrade_1_0(File)
test_upgrade_1_0_no_metadata(File)
test_upgrade_from_version(File)
test_upgrade_no_args(File)
test_upgrade_with_legacy_md(File)
test_write_no_model_files(File)
test_write_with_model_files(File)
class palladium.tests.test_persistence.TestUpgradeSteps

Bases: object

test_empty(steps)
test_three_steps_no_overlap(three_steps)
test_three_steps_overlap(three_steps)

palladium.tests.test_server module

class palladium.tests.test_server.TestAliveFunctional

Bases: object

test_empty_process_state(config, flask_client)
test_filled_process_state(config, process_store, flask_client)
test_missing_process_state(config, process_store, flask_client)
class palladium.tests.test_server.TestPredict

Bases: object

test_predict_functional(config, flask_app, flask_client)
test_unknown_exception(predict, flask_app)
class palladium.tests.test_server.TestPredictService

Bases: object

test_bad_request(PredictService, flask_app)
test_functional(PredictService, flask_app)
test_generic_error(PredictService, flask_app)
test_post_request(PredictService, flask_app)
test_predict_error(PredictService, flask_app)
test_probas(PredictService, flask_app)
test_sample_from_data(PredictService)
class palladium.tests.test_server.TestPredictStream

Bases: object

test_listen(stream)
test_listen_direct_exit(stream)
test_predict_error(stream)
test_predict_params(config, stream)

palladium.tests.test_util module

class palladium.tests.test_util.MyDummyComponent(arg1, arg2='blargh', subcomponent=None)

Bases: object

initialize_component(config)
class palladium.tests.test_util.TestApplyKwargs

Bases: object

test_it(apply_kwargs, myfunc)
test_typeerror(apply_kwargs, myfunc)
class palladium.tests.test_util.TestGetConfig

Bases: object

test_read(get_config, config)
test_read_environ(get_config, config)
class palladium.tests.test_util.TestInitializeConfig

Bases: object

test_initialize_config_already_initialized(config, initialize_config)
test_initialize_config_extra(config, initialize_config)
class palladium.tests.test_util.TestInitializeConfigImpl

Bases: object

test_initialize_config(_initialize_config)
test_initialize_config_logging(_initialize_config)
class palladium.tests.test_util.TestPartial

Bases: object

classmethod myfunc(one, two, three='three')
test_dotted(Partial)
test_it(Partial)
class palladium.tests.test_util.TestPluggableDecorator

Bases: object

test_no_config(PluggableDecorator, config)
test_two_decorators(PluggableDecorator, config)
test_wrapped(PluggableDecorator, config)
test_wrapped_empty_list(PluggableDecorator, config)
class palladium.tests.test_util.TestProcessStore

Bases: object

test_clear(store)
test_delitem(store)
test_get(store)
test_getitem(store)
test_in(store)
test_init(store)
test_mtime_delitem(store)
test_mtime_no_entry(store)
test_mtime_setitem(store)
test_setitem(store)
class palladium.tests.test_util.TestResolveDottedName

Bases: object

test_with_colon(resolve_dotted_name)
test_with_dots(resolve_dotted_name)
class palladium.tests.test_util.TestRruleThread

Bases: object

test_func_raises(RruleThread)
test_last_execution(RruleThread)
test_rrule_from_dict(RruleThread)
test_sleep_between_checks(RruleThread)
class palladium.tests.test_util.TestSessionScope

Bases: object

test_exception()
test_success()
class palladium.tests.test_util.TestUpgrade

Bases: object

test_from_version(upgrade)
test_from_version_and_to_version(upgrade)
test_no_args(upgrade)
palladium.tests.test_util.dec1(func)
palladium.tests.test_util.dec2(func)
palladium.tests.test_util.test_args_from_config(config)
palladium.tests.test_util.test_config_class_keyerror()
palladium.tests.test_util.test_create_component()

Module contents

palladium.tests.change_cwd(path)
palladium.tests.predict(path='/predict?sepal length=1.0&sepal width=1.1&petal length=0.777&petal width=5')
palladium.tests.pytest_addoption(parser)
palladium.tests.pytest_configure(config)
palladium.tests.pytest_runtest_setup(item)
palladium.tests.run_smoke_tests_with_config(config_fname, run=None, raise_errors=True, func_kwargs=None)