TestGeneral

class tests.general.test_general.TestGeneral(methodName='runTest')[source]

General test cases that don’t fit under a specific category

__init__(methodName='runTest')

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

Methods

Methods

setUp()

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

test_call_sys_async_read(**kwargs)

test_call_sys_async_write(**kwargs)

test_call_sys_read()

Test reading output from call_sys by calling ‘ls -l’ on a temporary folder with spaces in it

test_call_sys_write()

Test piping data into a process with call_sys

test_chunked()

Create a 20 element long list, split it into 4 chunks, and verify the chunks are correctly made

test_filter_form_dict1()

Test filter_form() with a standard dict

test_filter_form_dict_cast()

Test filter_form() with a dict and auto-casting

test_human_name_class()

Test human_name() with class references and class instances

test_human_name_func()

Test human_name() with function references

test_human_name_str_bytes()

Test human_name() with string and bytes names

test_inject_items()

Test inject_items() injecting into a list after position 1

test_inject_items_2()

Test inject_items() injecting into a list after position 3

test_retry_on_err()

Test that the helpers.retry_on_err decorator retries a function 3 times as expected

test_retry_on_err_return()

Test that the helpers.retry_on_err decorator can return correctly after some retries

Attributes

Attributes