Skip to content

TestUtil

Implementation of the test utilities

PrintError

Canonical path: TestHelper.TestUtil.PrintError

Bases: TestCase

helper class

__init__

__init__(new_text: str, indent_count: int)

initialize

Parameters:

  • new_text (str) –

    new element text

  • indent_count (int) –

    indent count

copy_text_to_clipboard

copy_text_to_clipboard()

copy the text to the clipboard

execute

execute(ele1_str: str, ele2_str: str, str1: str, str2: str, info_str='')

execute the assert

Parameters:

  • ele1_str (str) –

    strings from the first element

  • ele2_str (str) –

    strings from the second element

  • str1 (str) –

    row string from the first element

  • str2 (str) –

    row string from the second element

  • info_str

    info string

print_msg

print_msg(msg)

print a message

compare_element_strings

compare_element_strings(
    ele1_str: str,
    ele2_str: str,
    indent_count: int = 41,
    compare_text: bool = False,
)

Compare two element string with "real value compare

Parameters:

  • ele1_str (str) –

    string from the first element

  • ele2_str (str) –

    string from the second element

  • indent_count (int, default: 41 ) –

    indent count

  • compare_text (bool, default: False ) –

    compare the text left from the =

compare_file_with_text

compare_file_with_text(file_name: str, text: str, indent_count: int = 41)

Compare a file with a text

Parameters:

  • file_name (str) –

    name of the file

  • text (str) –

    text

  • indent_count (int, default: 41 ) –

    indent count

compare_vertices

compare_vertices(
    line_index1: int,
    ele1_str_list: List[str],
    ele2_str_list: List[str],
    print_error: PrintError,
) -> int

compare the vertices

get_handle_string

get_handle_string(build_ele_list)

Get the handle string from the building element list

print_compare_string

print_compare_string(compare_string)

Print a string for the test data compare