Пример #1
0
 def basic_settings(self):
     # Just a catchall for what the baseline config settings should
     # be...for some reason we're not actually capturing all of these
     # reliably (even if their defaults are often implied by the tests
     # which override them, e.g. runner tests around warn=True, etc).
     expected = {
         "run": {
             "asynchronous": False,
             "disown": False,
             "dry": False,
             "echo": False,
             "echo_stdin": None,
             "encoding": None,
             "env": {},
             "err_stream": None,
             "fallback": True,
             "hide": None,
             "in_stream": None,
             "out_stream": None,
             "pty": False,
             "replace_env": False,
             "shell": "/bin/bash",
             "warn": False,
             "watchers": [],
         },
         "runners": {"local": Local},
         "sudo": {
             "password": None,
             "prompt": "[sudo] password: "******"user": None,
         },
         "tasks": {
             "auto_dash_names": True,
             "collection_name": "tasks",
             "dedupe": True,
             "executor_class": None,
             "search_root": None,
         },
         "timeouts": {"command": None},
     }
     assert Config.global_defaults() == expected
Пример #2
0
 def global_defaults():
     orig = Config.global_defaults()
     orig["new"] = {"data": "ohai"}
     return orig