jobcontrol.utils.testing

jobcontrol.utils.testing.job_simple_echo(*args, **kwargs)[source]
jobcontrol.utils.testing.testing_job(progress_steps=None, retval=None, fail=False, skip=False, log_messages=None, step_duration=0)[source]

Job used for testing purposes.

Parameters:
  • progress_steps

    A list of tuples: (<group_name>, <steps>), where “group_name” is a tuple of name “levels”, “steps” an integer representing how many steps should that level have.

    Progress reports will be sent in randomized order.

  • retval – The return value for the job.
  • fail – Whether this job should fail.
  • skip – Whether this job should be skipped.
  • log_messages – A list of tuples: (level, message)
  • step_duration – The time to sleep between steps, in milliseconds.
jobcontrol.utils.testing.job_with_logging()[source]
jobcontrol.utils.testing.job_with_tracer_log()[source]
jobcontrol.utils.testing.job_failing_once()[source]

This job will fail exactly once; retry will be successful

jobcontrol.utils.testing.job_echo_config(*args, **kwargs)[source]

Simple job, “echoing” back the current configuration.

class jobcontrol.utils.testing.RecordingLogHandler[source]

Log handler that records messages

flush()[source]
emit(record)[source]
print_messages()[source]
clear_messages()[source]
class jobcontrol.utils.testing.NonSerializableObject[source]
foo
bar
exception jobcontrol.utils.testing.NonSerializableException[source]
jobcontrol.utils.testing.job_returning_nonserializable()[source]
jobcontrol.utils.testing.job_raising_nonserializable()[source]

Previous topic

jobcontrol.utils.local

Next topic

jobcontrol.utils.web

This Page