fireworks.core.tests package

Submodules

fireworks.core.tests.tasks module

class fireworks.core.tests.tasks.DetoursTask(*args, **kwargs)

Bases: FiretaskBase

optional_params = ['n_detours', 'data_per_detour']
run_task(fw_spec)

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Parameters:

fw_spec (dict) – A Firework spec. This comes from the master spec. In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

class fireworks.core.tests.tasks.DoNothingTask(*args, **kwargs)

Bases: FiretaskBase

run_task(fw_spec) None

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Parameters:

fw_spec (dict) – A Firework spec. This comes from the master spec. In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

class fireworks.core.tests.tasks.ExceptionTestTask(*args, **kwargs)

Bases: FiretaskBase

exec_counter = 0
run_task(fw_spec) None

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Parameters:

fw_spec (dict) – A Firework spec. This comes from the master spec. In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

class fireworks.core.tests.tasks.ExecutionCounterTask(*args, **kwargs)

Bases: FiretaskBase

exec_counter = 0
run_task(fw_spec) None

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Parameters:

fw_spec (dict) – A Firework spec. This comes from the master spec. In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

class fireworks.core.tests.tasks.MalformedAdditionTask(*args, **kwargs)

Bases: FiretaskBase

run_task(fw_spec)

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Parameters:

fw_spec (dict) – A Firework spec. This comes from the master spec. In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

exception fireworks.core.tests.tasks.SerializableException(exc_details)

Bases: Exception

__init__(exc_details) None
to_dict()
class fireworks.core.tests.tasks.SlowAdditionTask(*args, **kwargs)

Bases: FiretaskBase

run_task(fw_spec)

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Parameters:

fw_spec (dict) – A Firework spec. This comes from the master spec. In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

class fireworks.core.tests.tasks.SlowTodictTask(*args, **kwargs)

Bases: FiretaskBase

run_task(fw_spec)

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Parameters:

fw_spec (dict) – A Firework spec. This comes from the master spec. In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

to_dict()
class fireworks.core.tests.tasks.TodictErrorTask(*args, **kwargs)

Bases: FiretaskBase

run_task(fw_spec)

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Parameters:

fw_spec (dict) – A Firework spec. This comes from the master spec. In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

to_dict() NoReturn
class fireworks.core.tests.tasks.WaitWFLockTask(*args, **kwargs)

Bases: FiretaskBase

run_task(fw_spec)

This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.

Parameters:

fw_spec (dict) – A Firework spec. This comes from the master spec. In addition, this spec contains a special “_fw_env” key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, “foo” may be named “foo1” in resource 1 and “foo2” in resource 2. The FWorker env can specify { “foo”: “foo1”}, which maps an abstract variable “foo” to the relevant “foo1” or “foo2”. You can then write a task that uses fw_spec[“_fw_env”][“foo”] that will work across all these multiple resources.

Returns:

(FWAction)

fireworks.core.tests.test_firework module

fireworks.core.tests.test_launchpad module

fireworks.core.tests.test_rocket module

class fireworks.core.tests.test_rocket.RocketTest(methodName='runTest')

Bases: TestCase

setUp() None

Hook method for setting up the test fixture before exercising it.

classmethod setUpClass() None

Hook method for setting up class fixture before running tests in the class.

tearDown() None

Hook method for deconstructing the test fixture after testing it.

classmethod tearDownClass() None

Hook method for deconstructing the class fixture after running all tests in the class.

test_postproc_exception() None
test_serializable_exception() None

fireworks.core.tests.test_tracker module

Tracker unitest.

class fireworks.core.tests.test_tracker.TrackerTest(methodName='runTest')

Bases: TestCase

setUp() None

Hook method for setting up the test fixture before exercising it.

classmethod setUpClass() None

Hook method for setting up class fixture before running tests in the class.

tearDown() None

Hook method for deconstructing the test fixture after testing it.

classmethod tearDownClass() None

Hook method for deconstructing the class fixture after running all tests in the class.

test_tracker() None

Launch a workflow and track the files.

test_tracker_failed_fw() None

Add a bad firetask to workflow and test the tracking.

test_tracker_mlaunch() None

Test the tracker for mlaunch.

Module contents