# Subunit Trace

Trace a subunit stream in reasonable detail and high accuracy.

`stestr.subunit_trace.``cleanup_test_name`(name, strip_tags=True, strip_scenarios=False)

  Clean up the test name for display.

  By default we strip out the tags in the test because they don’t help us in identifying the test that is run to it’s result.

  Make it possible to strip out the testscenarios information (not to be confused with tempest scenarios) however that’s often needed to indentify generated negative tests.

`stestr.subunit_trace.``find_worker`(test)

  Get the worker number.

  If there are no workers because we aren’t in a concurrent environment, assume the worker number is 0.

`stestr.subunit_trace.``print_attachments`(stream, test, all_channels=False, show_binary_attachments=False)

  Print out subunit attachments.

  Print out subunit attachments that contain content. This runs in 2 modes, one for successes where we print out just stdout and stderr, and an override that dumps all the attachments.

`stestr.subunit_trace.``print_fails`(stream)

  Print summary failure report.

  Currently unused, however there remains debate on inline vs. at end reporting, so leave the utility function for later use.