test_test_helper_funcs¶
Script to test the functions in the test helper package (test_helper_funcs.py).
Module Contents¶
Functions¶
Function with no parameters and no return value. |
|
Function with one integer parameter and no return value. |
|
Function with two integer parameters and no return value. |
|
Function with no parameters and one integer return value. |
|
Function with no parameters and two integer return values. |
|
Function with one integer parameter and one integer return value. |
|
Function with two parameters and two return values. |
|
Returns True. |
|
Returns False. |
|
Returns True if the input parameter is an even integer. |
|
Returns True if the list contains the specified integer value. |
Data¶
int : Default integer value that should be returned by a function (makes it easier to standardize tests). |
|
int : Default return value returned by functions in this test suite. |
|
bool : Boolean flag for whether all tests should be run, regardless of their boolean flags below. |
|
bool : Boolean flag for whether or not to run the tests for the run_single_test function. |
|
bool : Boolean flag for whether or not to run the tests for the run_func_tests function. |
|
bool : Boolean flag for whether or not to run the tests for the test_bool_func function. |
|
bool : Boolean flag for whether to test the testing library on a function with no parameters and no outputs. |
|
bool : Boolean flag for whether to test the testing library on a function with one parameter and no outputs. |
|
bool : Boolean flag for whether to test the testing library on a function with two parameters and no outputs. |
|
bool : Boolean flag for whether to test the testing library on a function with no parameters and one return value. |
|
bool : Boolean flag for whether to test the testing library on a function with no parameters and two return values. |
|
bool : Boolean flag for whether to test the testing library on a function than always returns True. |
|
bool : Boolean flag for whether to test the testing library on a function than always returns False. |
|
bool : Boolean flag for whether to test the testing library on a function than outputs whether an integer is even. |
|
bool : Boolean flag for whether to test the library on a function that checks if a list contains a certain value. |
API¶
- test_test_helper_funcs.DEFAULT_INT = 0¶
int : Default integer value that should be returned by a function (makes it easier to standardize tests).
- test_test_helper_funcs.DEFAULT_RETURN_VAL = None¶
int : Default return value returned by functions in this test suite.
- test_test_helper_funcs.run_all_tests = True¶
bool : Boolean flag for whether all tests should be run, regardless of their boolean flags below.
- test_test_helper_funcs.test_run_single_test = False¶
bool : Boolean flag for whether or not to run the tests for the run_single_test function.
- test_test_helper_funcs.test_run_func_tests = False¶
bool : Boolean flag for whether or not to run the tests for the run_func_tests function.
- test_test_helper_funcs.test_test_bool_func = True¶
bool : Boolean flag for whether or not to run the tests for the test_bool_func function.
- test_test_helper_funcs.test_with_no_param_no_return = False¶
bool : Boolean flag for whether to test the testing library on a function with no parameters and no outputs.
- test_test_helper_funcs.test_with_one_param_no_return = False¶
bool : Boolean flag for whether to test the testing library on a function with one parameter and no outputs.
- test_test_helper_funcs.test_with_two_param_no_return = False¶
bool : Boolean flag for whether to test the testing library on a function with two parameters and no outputs.
- test_test_helper_funcs.test_with_no_param_one_return = False¶
bool : Boolean flag for whether to test the testing library on a function with no parameters and one return value.
- test_test_helper_funcs.test_with_no_param_two_return = False¶
bool : Boolean flag for whether to test the testing library on a function with no parameters and two return values.
- test_test_helper_funcs.test_with_always_true = False¶
bool : Boolean flag for whether to test the testing library on a function than always returns True.
- test_test_helper_funcs.test_with_always_false = False¶
bool : Boolean flag for whether to test the testing library on a function than always returns False.
- test_test_helper_funcs.test_with_is_even = False¶
bool : Boolean flag for whether to test the testing library on a function than outputs whether an integer is even.
- test_test_helper_funcs.test_with_list_has_val_with_type_errors = True¶
bool : Boolean flag for whether to test the library on a function that checks if a list contains a certain value.
- test_test_helper_funcs.no_param_no_return()¶
Function with no parameters and no return value.
- test_test_helper_funcs.one_param_no_return(int_val)¶
Function with one integer parameter and no return value.
Parameters¶
- int_valint
An integer value.
- test_test_helper_funcs.two_param_no_return(int_val1, int_val2)¶
Function with two integer parameters and no return value.
Parameters¶
- int_val1int
The first integer parameter.
- int_val2int
The second integer parameter.
- test_test_helper_funcs.no_param_one_return()¶
Function with no parameters and one integer return value.
Returns¶
- int
This function returns the default integer value constant that is defined at the top of this file.
- test_test_helper_funcs.no_param_two_return()¶
Function with no parameters and two integer return values.
Returns¶
- default_intint
The default integer constant from the top of this file.
- default_int_plus_oneint
The next integer value after the default integer constant.
- test_test_helper_funcs.one_param_one_return(int_val)¶
Function with one integer parameter and one integer return value.
Parameters¶
- int_valint
An integer parameter.
Returns¶
- int
Returns the sum of one and the integer parameter (int_val + 1).
- test_test_helper_funcs.two_param_two_return(int_val, str_val)¶
Function with two parameters and two return values.
Parameters¶
- int_valint
An integer parameter.
- str_valstr
A string parameter.
Returns¶
- int
The sum of one and the integer parameter (int_val + 1).
- str
The concatenation of the string parameter and “a”.
- test_test_helper_funcs.always_true()¶
Returns True.
- test_test_helper_funcs.always_false()¶
Returns False.
- test_test_helper_funcs.is_even(int_val)¶
Returns True if the input parameter is an even integer.
Parameters¶
- int_valint
The integer value that we need to check for evenness.
Returns¶
- bool
A boolean indicating if the input parameter is an even integer.
- test_test_helper_funcs.list_has_val_with_type_errors(list_to_search, int_val)¶
Returns True if the list contains the specified integer value.
Parameters¶
- list_to_searchlist
The list in which we should look for the value.
- int_valint
The integer value that we will try to find in the list.
Returns¶
- bool
A boolean indicating if the list contains the specified integer value.