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
- 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)
- 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¶
TODO: Modify unittest doc.
- class fireworks.core.tests.test_firework.FiretaskBaseTest(methodName='runTest')¶
Bases:
TestCase
- class fireworks.core.tests.test_firework.FiretaskPickleTest(methodName='runTest')¶
Bases:
TestCase
- class fireworks.core.tests.test_firework.PickleTask(*args, **kwargs)¶
Bases:
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:
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:
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_launchpad module¶
- class fireworks.core.tests.test_launchpad.AuthenticationTest(methodName='runTest')¶
Bases:
TestCase
Tests whether users are authenticating against the correct mongo dbs.
- classmethod setUpClass() None ¶
Hook method for setting up class fixture before running tests in the class.
- test_authenticating_to_users_db() None ¶
A user should be able to authenticate against a database that they are a user of.
- class fireworks.core.tests.test_launchpad.GridfsStoredDataTest(methodName='runTest')¶
Bases:
TestCase
Tests concerning the storage of data in Gridfs when the size of the documents exceed the 16MB limit.
- pytestmark = [Mark(name='mongodb', args=(), kwargs={})]¶
- classmethod setUpClass() None ¶
Hook method for setting up class fixture before running tests in the class.
- class fireworks.core.tests.test_launchpad.LaunchPadDefuseReigniteRerunArchiveDeleteTest(methodName='runTest')¶
Bases:
TestCase
- classmethod setUpClass() None ¶
Hook method for setting up class fixture before running tests in the class.
- class fireworks.core.tests.test_launchpad.LaunchPadLostRunsDetectTest(methodName='runTest')¶
Bases:
TestCase
- classmethod setUpClass() None ¶
Hook method for setting up class fixture before running tests in the class.
- class fireworks.core.tests.test_launchpad.LaunchPadOfflineTest(methodName='runTest')¶
Bases:
TestCase
- classmethod setUpClass() None ¶
Hook method for setting up class fixture before running tests in the class.
- class fireworks.core.tests.test_launchpad.LaunchPadRerunExceptionTest(methodName='runTest')¶
Bases:
TestCase
- classmethod setUpClass() None ¶
Hook method for setting up class fixture before running tests in the class.
- class fireworks.core.tests.test_launchpad.LaunchPadTest(methodName='runTest')¶
Bases:
TestCase
- classmethod setUpClass() None ¶
Hook method for setting up class fixture before running tests in the class.
- class fireworks.core.tests.test_launchpad.WFLockTest(methodName='runTest')¶
Bases:
TestCase
- classmethod setUpClass() None ¶
Hook method for setting up class fixture before running tests in the class.
- class fireworks.core.tests.test_launchpad.WorkflowFireworkStatesTest(methodName='runTest')¶
Bases:
TestCase
Class to test the firework states locally cached in workflow. The states have to be in sync with the actual firework state.
- classmethod setUpClass() None ¶
Hook method for setting up class fixture before running tests in the class.
fireworks.core.tests.test_rocket module¶
- class fireworks.core.tests.test_rocket.RocketTest(methodName='runTest')¶
Bases:
TestCase
- classmethod setUpClass() None ¶
Hook method for setting up class fixture before running tests in the class.
fireworks.core.tests.test_tracker module¶
Tracker unitest.
- class fireworks.core.tests.test_tracker.TrackerTest(methodName='runTest')¶
Bases:
TestCase
- classmethod setUpClass() None ¶
Hook method for setting up class fixture before running tests in the class.