def main(): print( dedent(''' =============== Available Tests =============== ''')) for key in tests.AvailableTests: if not key: continue test = CLIRules.get_test(key) docstring = test.__doc__.strip() if not docstring.startswith(' '): # Guess what the right indentation is. docstring = ' ' * 2 + docstring s = dedent(""" {name} {hr} {desc} """).format(name=key, desc=dedent(docstring), hr='-' * len(key)) print(dedent(s))
def main(): print(dedent(''' =============== Available Tests =============== ''')) for key in tests.AvailableTests: if not key: continue test = CLIRules.get_test(key) docstring = test.__doc__.strip() if not docstring.startswith(' '): # Guess what the right indentation is. docstring = ' '*2+docstring s = dedent(""" {name} {hr} {desc} """).format(name=key, desc=dedent(docstring), hr='-'*len(key)) print(dedent(s))
def testable_cli_rules(**args): """Return a CLIRules instance that uses our test internet.""" from .helpers import rules cli_rules = CLIRules(Script.get_default_namesspace(**args)) cli_rules.configure_session = lambda s, p: rules.configure_session(cli_rules, s, p) return cli_rules