scope_harness.ScopeHarness

class scope_harness.ScopeHarness

This is the main class for scope harness testing. An instance of it needs to be created using one of the static class methods (new_from_*) before any tests can be performed. The instance of ResultsView provided by results_view property is the entry point for invoking actual queries.

Here is an example of a search request:
harness = ScopeHarness.new_from_scope_list(Parameters([‘my-scope.ini’]) view = harness.results_view view.active_scope = ‘my-scope’ view.search_query = ‘’
static new_from_pre_existing_config((str)arg1) → ScopeHarness :

Creates ScopeHarness instance from scope runtime configuration files in given directory

static new_from_scope_list((Parameters)arg1) → ScopeHarness :

Creates ScopeHarness instance from a configuration provided by an instance of CustomRegistry passed to this factory method

static new_from_system() → ScopeHarness :

Creates ScopeHarness instance using default configuration from the system