fireworks.core.tests package

Submodules

fireworks.core.tests.tasks module

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

Bases: fireworks.core.firework.FiretaskBase

exec_counter = 0
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.ExecutionCounterTask(*args, **kwargs)

Bases: fireworks.core.firework.FiretaskBase

exec_counter = 0
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.MalformedAdditionTask(*args, **kwargs)

Bases: fireworks.core.firework.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)

Initialize self. See help(type(self)) for accurate signature.

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

Bases: fireworks.core.firework.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: fireworks.core.firework.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: fireworks.core.firework.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.WaitWFLockTask(*args, **kwargs)

Bases: fireworks.core.firework.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

class fireworks.core.tests.test_firework.FiretaskBaseTest(methodName='runTest')

Bases: unittest.case.TestCase

test_init()
class fireworks.core.tests.test_firework.FiretaskPickleTest(methodName='runTest')

Bases: unittest.case.TestCase

setUp()

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

test_init()
class fireworks.core.tests.test_firework.PickleTask(*args, **kwargs)

Bases: fireworks.core.firework.FiretaskBase

required_params = ['test']
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.test_firework.Task1(*args, **kwargs)

Bases: fireworks.core.firework.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.test_firework.Task2(*args, **kwargs)

Bases: fireworks.core.firework.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.test_firework.WorkflowTest(methodName='runTest')

Bases: unittest.case.TestCase

setUp()

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

test_copy()

Test that we can produce a copy of a Workflow but that the copy has unique fw_ids.

test_init()
test_remove_leaf_fws()
test_remove_root_fws()

fireworks.core.tests.test_launchpad module

class fireworks.core.tests.test_launchpad.LaunchPadDefuseReigniteRerunArchiveDeleteTest(methodName='runTest')

Bases: unittest.case.TestCase

setUp()

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

classmethod setUpClass()

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

tearDown()

Hook method for deconstructing the test fixture after testing it.

classmethod tearDownClass()

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

test_archive_wf()
test_defuse_fw()
test_defuse_fw_after_completion()
test_defuse_wf()
test_defuse_wf_after_partial_run()
test_delete_wf()
test_delete_wf_and_files()
test_pause_fw()
test_pause_wf()
test_reignite_fw()
test_reignite_wf()
test_rerun_fws2()
class fireworks.core.tests.test_launchpad.LaunchPadLostRunsDetectTest(methodName='runTest')

Bases: unittest.case.TestCase

setUp()

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

classmethod setUpClass()

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

tearDown()

Hook method for deconstructing the test fixture after testing it.

classmethod tearDownClass()

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

test_detect_lostruns()
test_detect_lostruns_defuse()
test_state_after_run_start()
class fireworks.core.tests.test_launchpad.LaunchPadOfflineTest(methodName='runTest')

Bases: unittest.case.TestCase

setUp()

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

classmethod setUpClass()

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

tearDown()

Hook method for deconstructing the test fixture after testing it.

classmethod tearDownClass()

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

test__recover_completed()
test_recover_errors()
class fireworks.core.tests.test_launchpad.LaunchPadRerunExceptionTest(methodName='runTest')

Bases: unittest.case.TestCase

setUp()

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

classmethod setUpClass()

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

tearDown()

Hook method for deconstructing the test fixture after testing it.

classmethod tearDownClass()

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

test_except_details_on_rerun()
test_task_level_rerun()
test_task_level_rerun_cp()
test_task_level_rerun_prev_dir()
class fireworks.core.tests.test_launchpad.LaunchPadTest(methodName='runTest')

Bases: unittest.case.TestCase

setUp()

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

classmethod setUpClass()

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

tearDown()

Hook method for deconstructing the test fixture after testing it.

classmethod tearDownClass()

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

test_add_wf()
test_add_wfs()
test_dict_from_file()
test_pw_check()
test_reset()
class fireworks.core.tests.test_launchpad.WFLockTest(methodName='runTest')

Bases: unittest.case.TestCase

setUp()

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

classmethod setUpClass()

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

tearDown()

Hook method for deconstructing the test fixture after testing it.

classmethod tearDownClass()

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

test_fix_db_inconsistencies_completed()
test_fix_db_inconsistencies_fizzled()
class fireworks.core.tests.test_launchpad.WorkflowFireworkStatesTest(methodName='runTest')

Bases: unittest.case.TestCase

Class to test the firework states locally cached in workflow. The states have to be in sync with the actual firework state.

setUp()

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

classmethod setUpClass()

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

tearDown()

Hook method for deconstructing the test fixture after testing it.

classmethod tearDownClass()

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

test_archive_wf()
test_defuse_fw()
test_defuse_fw_after_completion()
test_defuse_wf()
test_reignite_fw()
test_reignite_wf()
test_rerun_fws()
test_rerun_timed_fws()

fireworks.core.tests.test_rocket module

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

Bases: unittest.case.TestCase

setUp()

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

classmethod setUpClass()

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

tearDown()

Hook method for deconstructing the test fixture after testing it.

classmethod tearDownClass()

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

test_postproc_exception()
test_serializable_exception()

fireworks.core.tests.test_tracker module

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

Bases: unittest.case.TestCase

setUp()

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

classmethod setUpClass()

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

tearDown()

Hook method for deconstructing the test fixture after testing it.

classmethod tearDownClass()

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

test_tracker()

Launch a workflow and track the files

test_tracker_failed_fw()

Add a bad firetask to workflow and test the tracking

test_tracker_mlaunch()

Test the tracker for mlaunch

Module contents