MCPcopy
hub / github.com/deadc0de6/dotdrop / load_options

Function load_options

tests/helpers.py:163–180  ·  view source on GitHub ↗

Load the config file from path

(confpath, profile)

Source from the content-addressed store, hash-verified

161
162
163def load_options(confpath, profile):
164 """Load the config file from path"""
165 # create the fake args (bypass docopt)
166 args = _fake_args()
167 args['--cfg'] = confpath
168 args['--profile'] = profile
169 args['--verbose'] = True
170 # and get the options
171 opt = Options(args=args)
172 opt.profile = profile
173 opt.dry = False
174 opt.safe = False
175 opt.install_diff = True
176 opt.import_link = LinkTypes.NOLINK
177 opt.install_showdiff = True
178 opt.debug = True
179 opt.dotpath = os.path.join(os.path.dirname(confpath), 'dotfiles')
180 return opt
181
182
183def get_path_strip_version(path):

Callers 9

test_updateMethod · 0.90
test_listingsMethod · 0.90
test_compareMethod · 0.90
test_installMethod · 0.90
test_removeMethod · 0.90
test_jhelpersMethod · 0.90
test_importMethod · 0.90

Calls 2

OptionsClass · 0.90
_fake_argsFunction · 0.85

Tested by 9

test_updateMethod · 0.72
test_listingsMethod · 0.72
test_compareMethod · 0.72
test_installMethod · 0.72
test_removeMethod · 0.72
test_jhelpersMethod · 0.72
test_importMethod · 0.72