exopy.testing.measurement.dummies module

Dummy engines, editors and measurement tools used for testing.

Those are contributed by the manifest found in contributions.enaml

class exopy.testing.measurement.dummies.DummyEditor(parent=None, **kwargs)[source]

Bases: exopy.measurement.editors.base_editor.BaseEditor

Dummy editor used for testing.

class exopy.testing.measurement.dummies.DummyEngine[source]

Bases: exopy.measurement.engines.base_engine.BaseEngine

Dummy engine used for testing.

fail_perform

A value of type bool.

waiting

A member class which supports value initialization.

A plain Value provides support for default values and factories, but does not perform any type checking or validation. It serves as a useful base class for scalar members and can be used for cases where type checking is not needed (like private attributes).

go_on

A member class which supports value initialization.

A plain Value provides support for default values and factories, but does not perform any type checking or validation. It serves as a useful base class for scalar members and can be used for cases where type checking is not needed (like private attributes).

should_pause

A value of type bool.

accept_pause

A value of type bool.

should_resume

A value of type bool.

measurement_force_enqueued

A value of type bool.

signal_resuming

A member class which supports value initialization.

A plain Value provides support for default values and factories, but does not perform any type checking or validation. It serves as a useful base class for scalar members and can be used for cases where type checking is not needed (like private attributes).

go_on_resuming

A member class which supports value initialization.

A plain Value provides support for default values and factories, but does not perform any type checking or validation. It serves as a useful base class for scalar members and can be used for cases where type checking is not needed (like private attributes).

signal_resumed

A member class which supports value initialization.

A plain Value provides support for default values and factories, but does not perform any type checking or validation. It serves as a useful base class for scalar members and can be used for cases where type checking is not needed (like private attributes).

go_on_resumed

A member class which supports value initialization.

A plain Value provides support for default values and factories, but does not perform any type checking or validation. It serves as a useful base class for scalar members and can be used for cases where type checking is not needed (like private attributes).

perform(exec_infos)[source]

Simply return the exec_infos.

pause()[source]

Ask the engine to pause the execution.

This method should not wait for the task to pause to return. When the pause is effective the engine should signal it by updating its status.

resume()[source]

Ask the engine to resume the execution.

This method should not wait for the measurement to resume. When the pause is over the engine should signal it by updating its status.

stop(force=False)[source]

Stop the execution.

shutdown(force=False)[source]

Ask the engine to stop completely.

After a call to this method the engine may need to re-initialize a number of things before running the next task. This method should not wait for the engine to shutdown save if a forced stop was requested.

Parameters

force (bool, optional) – Force the engine to stop the performing the task. This allow the engine to use any means necessary to stop, in this case only should the call to this method block.

class exopy.testing.measurement.dummies.DummyHook[source]

Bases: atom.atom.Atom

Base class for dummy mesure hook used for testing.

fail_check

A value of type bool.

fail_run

A value of type bool.

should_pause

A value of type bool.

accept_pause

A value of type bool.

should_resume

A value of type bool.

stop_called

A value of type bool.

waiting

A member class which supports value initialization.

A plain Value provides support for default values and factories, but does not perform any type checking or validation. It serves as a useful base class for scalar members and can be used for cases where type checking is not needed (like private attributes).

go_on

A member class which supports value initialization.

A plain Value provides support for default values and factories, but does not perform any type checking or validation. It serves as a useful base class for scalar members and can be used for cases where type checking is not needed (like private attributes).

signal_resuming

A member class which supports value initialization.

A plain Value provides support for default values and factories, but does not perform any type checking or validation. It serves as a useful base class for scalar members and can be used for cases where type checking is not needed (like private attributes).

go_on_resuming

A member class which supports value initialization.

A plain Value provides support for default values and factories, but does not perform any type checking or validation. It serves as a useful base class for scalar members and can be used for cases where type checking is not needed (like private attributes).

signal_resumed

A member class which supports value initialization.

A plain Value provides support for default values and factories, but does not perform any type checking or validation. It serves as a useful base class for scalar members and can be used for cases where type checking is not needed (like private attributes).

go_on_resumed

A member class which supports value initialization.

A plain Value provides support for default values and factories, but does not perform any type checking or validation. It serves as a useful base class for scalar members and can be used for cases where type checking is not needed (like private attributes).

run(workbench, engine)[source]

Run method esecuting the hook.

pause()[source]

Method to call to pause execution.

resume()[source]

Method to call to resume execution.

stop(force=False)[source]

Method to call to stop execution.

class exopy.testing.measurement.dummies.DummyPreHook[source]

Bases: exopy.testing.measurement.dummies.DummyHook, exopy.measurement.hooks.base_hooks.BasePreExecutionHook

Dummy pre-execution hook used for testing.

check(workbench, **kwargs)[source]

Fail the check if the fail_check member is set or ‘fail’ is found in the kwargs.

list_runtimes(workbench)[source]

Say that dummy is a dependency.

accept_pause

A value of type bool.

fail_check

A value of type bool.

fail_run

A value of type bool.

should_pause

A value of type bool.

class exopy.testing.measurement.dummies.DummyMonitor[source]

Bases: exopy.measurement.monitors.base_monitor.BaseMonitor

Dummy monitor used for testing.

running

A value of type bool.

monitored_entries

A member which allows list values.

Assigning to a list creates a copy. The orginal list will remain unmodified. This is similar to the semantics of the assignment operator on the C++ STL container classes.

received_news

A member which allows list values.

Assigning to a list creates a copy. The orginal list will remain unmodified. This is similar to the semantics of the assignment operator on the C++ STL container classes.

start()[source]

Start the activity of the monitor.

When this method is called the monitor is already observing the engine and connected to its view.

stop()[source]

Stop the activity of the monitor.

When this method is invoked the monitor is no longer observing the engine.

refresh_monitored_entries(entries=None)[source]

Do nothing when refreshing.

handle_database_entries_change(news)[source]

Add all entries to the monitored ones.

handle_database_nodes_change(news)[source]

Simply ignore nodes updates.

process_news(news)[source]

Handle news received from the engine.

This method will be connected to the news signal of the engine when the measurement is started. The value received will be a tuple containing the name of the updated database entry and its new value.

This method is susceptible to be called in a thread that is not the GUI thread. Any update of members that are connected to the view should be done using enaml.application.deferred_call/schedule.

class exopy.testing.measurement.dummies.DummyPostHook[source]

Bases: exopy.testing.measurement.dummies.DummyHook, exopy.measurement.hooks.base_hooks.BasePostExecutionHook

Dummy post execution hook used for testing.

check(workbench, **kwargs)[source]

Fail the check if the fail_check member is set or ‘fail’ is found in the kwargs.

accept_pause

A value of type bool.

fail_check

A value of type bool.

fail_run

A value of type bool.

should_pause

A value of type bool.