def add_spec(spec: str) -> Do: yield NS.lift(present_venv(name)) yield NS.lift(variable_set_prefixed('interpreter', '/usr/bin/python3.7')) yield NS.lift(variable_set_prefixed('debug_pythonpath', True)) yield request('cram', spec, name=name) data = yield NS.inspect(lambda a: a.data) return k(data.venvs).must(contain(name)) & k(data.active).must(contain(target))
def hs_spec() -> Do: yield NS.lift(variable_set_prefixed('autostart', True)) yield request('cram', f'hs:nvim-hs-ghcid', name='nvim-hs-ghcid', track=False) yield NS.lift(wait_for_command('GhcidStart', timeout=1)) return k(1) == 1
def crm_rplugin_spec() -> Do: temp_dir('rplugin', 'venv', name, 'lib', 'python3.7') yield request('init') data = yield NS.inspect(lambda a: a.data) rplugin = data.chromatin_rplugin.to_either('no chromatin rplugin') venv = data.chromatin_venv.to_either('no chromatin venv') return ( k(rplugin).must(be_right(DistRplugin.cons('chromatin', 'chromatin'))) & k(venv).must(eq(rplugin / _.name)))
def python_path_spec() -> Do: dir = fixture_path('rplugin', 'path_spec') extra_path_pkg = fixture_path('rplugin', 'extra_path_pkg') yield NS.lift(variable_set_prefixed('autostart', True)) yield request('cram', f'dir:{dir}', name='path_spec', pythonpath=[extra_path_pkg]) result = yield NS.lift(call_once_defined('PathSpecTest', timeout=10)) return k(result) == 13
def extension_spec() -> Do: dir = fixture_path('rplugin', name) extension_path = fixture_path('rplugin', ext_name) yield NS.lift(variable_set_prefixed('autostart', True)) yield NS.lift(variable_set(f'{name}_components', List(f'{ext_name}.ext'))) yield request('cram', f'dir:{dir}', name='extension_spec', extensions=[extension_path]) result1 = yield NS.lift(call_once_defined('XTest', timeout=1)) result2 = yield NS.lift(call_once_defined('XExtTest', timeout=1)) return (k(result1) == 13) & (k(result2) == 23)
def one_spec() -> Do: yield NS.lift(present_venv(name)) yield update_data( rplugins=List(rplugin), venvs=List(name), active=List(active_rplugin), ready=List(name), ) yield request('update', 'flagellum') log_buffer = yield NS.inspect(lambda a: a.data.log_buffer) return k(log_buffer).must( contain(Echo.info(resources.updated_plugin(rplugin.name))))
def one_spec() -> Do: yield update_data(rplugins=List(rplugin)) yield request('show_plugins') log_buffer = yield NS.inspect(lambda a: a.data.log_buffer) return k(log_buffer).must( contain(Echo.info(resources.show_plugins(dir, List(rplugin)))))
def hs_directory_spec(spec: str) -> Do: yield request('cram', spec, name=name) active = yield NS.inspect(lambda a: a.data.active) return k(active).must(contain(target))
def hackage_spec() -> Do: yield NS.lift(variable_set_prefixed('autostart', True)) yield request('cram', f'hackage:proteome', name='proteome') yield NS.lift(wait_for_function('ProAdd', timeout=1)) return k(1) == 1
def hs_dir_spec() -> Do: flag_dir = fixture_path('rplugin', 'flagellum.hs') yield NS.lift(variable_set_prefixed('autostart', True)) yield request('cram', f'hs_dir:{flag_dir}', name='flagellum') yield NS.lift(wait_for_function('FlagTest', timeout=1)) return k(1) == 1
def dir_venv_spec() -> Do: flag_dir = fixture_path('rplugin', 'flagellum') yield NS.lift(variable_set_prefixed('autostart', True)) yield request('cram', f'dir:{flag_dir}', name='flagellum') yield NS.lift(wait_for_command('FlagTest', timeout=1)) yield NS.lift(await_k(log_entry, 'flagellum initialized'))
def one_spec() -> Do: yield NS.lift(present_venv(name)) yield request('init') data = yield NS.inspect(lambda a: a.data) return k(data.venvs).must(contain(name)) & k(data.active).must( contain(active_rplugin))