fireworks.user_objects.firetasks.tests package — FireWorks 2.0.4 documentation

# fireworks.user_objects.firetasks.tests package

## Submodules

## fireworks.user_objects.firetasks.tests.test_dataflow_tasks module

Unit tests for the dataflow tasks.

class fireworks.user_objects.firetasks.tests.test_dataflow_tasks.CommandLineTaskTest(methodName='runTest')

  Bases: `TestCase`

  run tests for CommandLineTask.

  test_command_line_task_1() → None

    Input from string to stdin, output from stdout to string.

  test_command_line_task_2() → None

    Input from string to data, output from stdout to file; input from file to stdin, output from stdout to string and from file.

  test_command_line_task_3() → None

    Input from string to data with command line options.

  test_command_line_task_4() → None

    Multiple string inputs, multiple file outputs.

class fireworks.user_objects.firetasks.tests.test_dataflow_tasks.ForeachTaskTest(methodName='runTest')

  Bases: `TestCase`

  run tests for ForeachTask.

  test_foreach_commandlinetask() → None

    Run CommandLineTask for a list of input data.

  test_foreach_pytask() → None

    Run PyTask for a list of numbers.

class fireworks.user_objects.firetasks.tests.test_dataflow_tasks.ImportDataTaskTest(methodName='runTest')

  Bases: `TestCase`

  run tests for ImportDataTask.

  test_import_data_task() → None

    Loads data from a file into spec.

class fireworks.user_objects.firetasks.tests.test_dataflow_tasks.JoinDictTaskTest(methodName='runTest')

  Bases: `TestCase`

  run tests for JoinDictTask.

  test_join_dict_task() → None

    Joins dictionaries into a new or existing dict in spec.

class fireworks.user_objects.firetasks.tests.test_dataflow_tasks.JoinListTaskTest(methodName='runTest')

  Bases: `TestCase`

  run tests for JoinListTask.

  test_join_list_task() → None

    Joins items into a new or existing list in spec.

fireworks.user_objects.firetasks.tests.test_dataflow_tasks.afunc(array, power)

  Return the powers of a list of numbers.

## fireworks.user_objects.firetasks.tests.test_fileio_tasks module

class fireworks.user_objects.firetasks.tests.test_fileio_tasks.CompressDecompressArchiveDirTest(methodName='runTest')

  Bases: `TestCase`

  setUp() → None

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

  tearDown() → None

    Hook method for deconstructing the test fixture after testing it.

  test_archive_dir() → None
  test_compress_dir() → None

class fireworks.user_objects.firetasks.tests.test_fileio_tasks.FileWriteDeleteTest(methodName='runTest')

  Bases: `TestCase`

  test_init() → None
  test_run() → None

## fireworks.user_objects.firetasks.tests.test_filepad_tasks module

class fireworks.user_objects.firetasks.tests.test_filepad_tasks.FilePadTasksTest(methodName='runTest')

  Bases: `TestCase`

  setUp() → None

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

  tearDown() → None

    Hook method for deconstructing the test fixture after testing it.

  test_addfilesfrompatterntask_run() → None
  test_addfilestask_run() → None
  test_deletefilestask_run() → None
  test_getfilesbyquerytask_ignore_degenerate_file_name() → None

    Tests on ignoring degenerate file name in result from FilePad query.

  test_getfilesbyquerytask_ignore_empty_result_run() → None

    Tests on ignoring empty results from FilePad query.

  test_getfilesbyquerytask_metafile_run() → None

    Tests writing metadata to a yaml file.

  test_getfilesbyquerytask_raise_degenerate_file_name() → None

    Tests on raising exception on degenerate file name from FilePad query.

  test_getfilesbyquerytask_raise_empty_result_run() → None

    Tests on raising exception on empty results from FilePad query.

  test_getfilesbyquerytask_run() → None

    Tests querying objects from FilePad by metadata.

  test_getfilesbyquerytask_run_some_identifier() → None

    Tests querying objects from FilePad by metadata.

  test_getfilesbyquerytask_sort_ascending_name_run() → None

    Tests on sorting queried files in ascending order.

  test_getfilesbyquerytask_sort_descending_name_run() → None

    Tests on sorting queried files in descending order.

  test_getfilestask_run() → None

## fireworks.user_objects.firetasks.tests.test_script_task module

TODO: Modify unittest doc.

class fireworks.user_objects.firetasks.tests.test_script_task.PyTaskTest(methodName='runTest')

  Bases: `TestCase`

  test_task() → None
  test_task_auto_kwargs() → None
  test_task_data_flow() → None

    Test dataflow parameters: inputs, outputs and chunk_number.

class fireworks.user_objects.firetasks.tests.test_script_task.ScriptTaskTest(methodName='runTest')

  Bases: `TestCase`

  test_scripttask() → None

fireworks.user_objects.firetasks.tests.test_script_task.afunc(y, z, a)

## fireworks.user_objects.firetasks.tests.test_templatewriter_task module

TODO: Modify unittest doc.

class fireworks.user_objects.firetasks.tests.test_templatewriter_task.TemplateWriterTaskTest(methodName='runTest')

  Bases: `TestCase`

  test_task() → None

## Module contents

Tests for firetasks covering dataflow and filepad utilities.