tests.test_helper package

Submodules

tests.test_helper.output_handler_file module

Output file handler for files.

class tests.test_helper.output_handler_file.OutputHandlerFile(file_path: str, file_handler: <plasoscaffolder.common.base_file_handler.BaseFileHandler object at 0x7fccfef3f160>, prompt_info: str = '', prompt_error: str = '', confirm: bool = True, confirm_amount_same: int = 100, prompt_info_list: [<class 'str'>] = [])[source]

Bases: plasoscaffolder.common.base_output_handler.BaseOutputHandler

Class representing the output handler for a file.

Confirm(text: str, default=True, abort=True)[source]

A confirmation, Default Y, if no abort execution. Use with caution.

Parameters:
  • text (str) – Prompts the user for a confirmation.
  • default (bool) – the default value.
  • abort (bool) – if the program should abort
Returns:

false if the user entered no, true if the user entered yes

Return type:

bool

PrintError(text: str) → str[source]

A echo for errors with click.

Parameters:text (str) – the text to print

Returns: the file the content was added

PrintInfo(text: str) → str[source]

A echo for infos.

Parameters:text (str) – the text to print

Returns: the file the content was added

PromptError(text: str) → str[source]

A prompt for errors. Use with caution. Endless Loops possible

Parameters:text (str) – the text to prompt
Returns:the user input
Return type:str
PromptInfo(text: str) → str[source]

A prompt for information with click. Use with caution. Endless Loops possible

Parameters:text (str) – the text to prompt
Returns:the user input
Return type:str
PromptInfoWithDefault(text: str, text_type: object, default: object) → str[source]

A prompt for information, with a default value and a required type.

Parameters:
  • text (str) – the text to prompt
  • text_type (object) – the type of the input
  • default (object) – the default value
Returns:

the user input

Return type:

str

tests.test_helper.path_helper module

helper for the test

tests.test_helper.path_helper.TemplatePath() → str[source]

generating the template path for the tests

Returns:the template path
Return type:str
tests.test_helper.path_helper.TestDatabasePath() → str[source]

generating the template path for the tests

Returns:the template path
Return type:str
tests.test_helper.path_helper.TestTemplatePath() → str[source]

generating the template path for the tests

Returns:the template path
Return type:str
tests.test_helper.path_helper.YapfStyleFilePath() → str[source]

gets the path to the yapf style file.

Returns:the yapf file path
Return type:str

Module contents