3. Test Code Documentation¶
3.1. repobuddy.tests
– Root package for tests¶
3.2. repobuddy.tests.arg_parser
– Argument Parser tests¶
3.3. repobuddy.tests.client_info
– Client Info tests¶
3.4. repobuddy.tests.command_handler
– Command Handler tests¶
3.5. repobuddy.tests.common
– Test Framework¶
-
exception
repobuddy.tests.common.
ShellError
(error_str)[source]¶ Bases:
repobuddy.utils.RepoBuddyBaseException
Exception raised by
ShellHelper
.
-
class
repobuddy.tests.common.
ShellHelper
[source]¶ Helper for performing shell operations.
-
classmethod
exec_command
(command, base_dir, debug_output=True)[source]¶ Execute a command.
Parameters: Returns: None
Raises: ShellError
if the program’s execution returned a non-zero return or any other errors.
-
classmethod
read_file_as_string
(filename)[source]¶ Read the contents of the file as a string and return it.
Parameters: filename (str) – The name of the file to read. Returns: Contents of the file. Return type: str Raises: ShellError
on errors.
-
classmethod
-
class
repobuddy.tests.common.
TestCaseBase
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
class
repobuddy.tests.common.
TestResult
[source]¶ Bases:
unittest.result.TestResult
-
PASSED
= 0¶
-
ERROR
= 1¶
-
FAILED
= 2¶
-
SKIPPED
= 3¶
-
EXPECTED_FAILURE
= 4¶
-
UNEXPECTED_SUCCESS
= 5¶
-