def test_find_plugin_pre_commit_script(repository, plugin): install_jig_plugin(repository, plugin) script = find_plugin_pre_commit_script(repository) assert script.endswith('pre-commit') assert isfile(script)
def run_spec(spec): repository = clone(spec.repository) install_jig_plugin(repository, spec.plugin) editor = shebang_editor(spec, find_plugin_pre_commit_script(repository)) original_shebang = next(editor) log.info('Running automated tests that are bundled with the plugin') log.info('Original shebang on the plugin is {}'.format(original_shebang)) for state in editor: log.info('Modifying the pre-commit to use {} {}'.format(*state)) log.info('Restored plugin pre-commit script to the original state')
def test_install_jig_plugin(repository, plugin): assert install_jig_plugin(repository, plugin)