def test(app, filepath, config, create=[]): tapp = test_app(app) for name in create: with open(tapp.temp_path(name), "w") as fh: pass project = app.windows[0].projects[0] path = tapp.temp_path(filepath) mod.open_files([path], project) eq_(tapp.state, "window project " + config)
def preferences(editor, args): """Open config file""" open_files([editor.app.config.path], editor.project)