The Utilities Module

class smacha.util.Tester(*args, **kwargs)[source]

Bases: unittest2.case.TestCase

Utility class for running unit tests.

The tests run by this class are performed by generating code using SMACHA scripts and templates and comparing the generated output code to the expected code.

set_debug_level(debug_level)[source]
set_output_py_dir(output_py_dir)[source]
set_output_yml_dir(output_yml_dir)[source]
set_write_output_files(write_output_files)[source]
class smacha.util.bcolors[source]

Colour terminal print strings.

A helper class containing string codes that can be concatenated to strings in order to provide colour to terminal output.

BOLD = u'\x1b[1m'
ENDC = u'\x1b[0m'
FAIL = u'\x1b[91m'
HEADER = u'\x1b[95m'
OKBLUE = u'\x1b[94m'
OKGREEN = u'\x1b[92m'
UNDERLINE = u'\x1b[4m'
WARNING = u'\x1b[93m'