eegprep.ExtensionTestHarness#
- class eegprep.ExtensionTestHarness(spec)#
Bases:
objectAssertion helper for extension author test suites.
- Parameters:
spec (ExtensionSpec)
- __init__(spec)#
- Parameters:
spec (ExtensionSpec)
- Return type:
None
Methods
__init__(spec)assert_action_callable(action_name)Load and return one action target, asserting that it is callable.
assert_action_history_result(action_name, ...)Call an action and assert it returns an EEGLAB-style
(EEG, com)result.Assert that every declared action lazy target loads to a callable object.
Assert static spec, menu, help, action, and
pop_*loading contracts.Assert that every declared help resource is packaged and readable.
Assert that every declared menu references a declared action or
pop_*function.assert_pop_function_callable(pop_function_name)Load and return one
pop_*target, asserting that it is callable.Call a
pop_*function withreturn_com=Trueand assert(EEG, com)output.Assert that every declared
pop_*lazy target loads to a callable object.assert_spec_valid(*[, current_version, ...])Assert that the spec passes EEGPrep registry validation.
from_entry_point(entry_point_name, *[, ...])Load an extension spec from the
eegprep.extensionsentry-point group.- classmethod from_entry_point(entry_point_name, *, entry_points_provider=<function entry_points>, current_version=None, version_provider=<function version>)#
Load an extension spec from the
eegprep.extensionsentry-point group.- Parameters:
- Return type:
- assert_spec_valid(*, current_version=None, version_provider=<function version>, check_resources=True)#
Assert that the spec passes EEGPrep registry validation.
Assert that every declared menu references a declared action or
pop_*function.- Return type:
None
- assert_help_resources_exist()#
Assert that every declared help resource is packaged and readable.
- Return type:
None
- assert_actions_load()#
Assert that every declared action lazy target loads to a callable object.
- Return type:
None
- assert_pop_functions_load()#
Assert that every declared
pop_*lazy target loads to a callable object.- Return type:
None
- assert_action_callable(action_name)#
Load and return one action target, asserting that it is callable.
- assert_pop_function_callable(pop_function_name)#
Load and return one
pop_*target, asserting that it is callable.
- assert_action_history_result(action_name, *args, **kwargs)#
Call an action and assert it returns an EEGLAB-style
(EEG, com)result.
- assert_pop_function_history_result(pop_function_name, *args, **kwargs)#
Call a
pop_*function withreturn_com=Trueand assert(EEG, com)output.
- assert_all_static_contracts()#
Assert static spec, menu, help, action, and
pop_*loading contracts.- Return type:
None