(self)
| 787 | |
| 788 | class TestGlobalOptionsDocumenter(unittest.TestCase): |
| 789 | def create_help_command(self): |
| 790 | types = ['blob', 'integer', 'boolean', 'string'] |
| 791 | arg_table = {} |
| 792 | for t in types: |
| 793 | name = f'{t}_type' |
| 794 | help_text = f'This arg type is {t}' |
| 795 | choices = ['A', 'B', 'C'] if t == 'string' else [] |
| 796 | arg_table[name] = CustomArgument( |
| 797 | name=name, |
| 798 | cli_type_name=t, |
| 799 | help_text=help_text, |
| 800 | choices=choices, |
| 801 | ) |
| 802 | help_command = mock.Mock(spec=HelpCommand) |
| 803 | help_command.arg_table = arg_table |
| 804 | help_command.doc = ReSTDocument() |
| 805 | return help_command |
| 806 | |
| 807 | def create_documenter(self): |
| 808 | return GlobalOptionsDocumenter(self.create_help_command()) |
no test coverage detected