MCPcopy Index your code
hub / github.com/pre-commit/pre-commit / in_merge_conflict

Function in_merge_conflict

tests/conftest.py:74–84  ·  view source on GitHub ↗
(tempdir_factory)

Source from the content-addressed store, hash-verified

72
73@pytest.fixture
74def in_merge_conflict(tempdir_factory):
75 path = make_consuming_repo(tempdir_factory, 'script_hooks_repo')
76 open(os.path.join(path, 'placeholder'), 'a').close()
77 cmd_output('git', 'add', 'placeholder', cwd=path)
78 git_commit(msg=in_merge_conflict.__name__, cwd=path)
79
80 conflict_path = tempdir_factory.get()
81 cmd_output('git', 'clone', path, conflict_path)
82 with cwd(conflict_path):
83 _make_conflict()
84 yield os.path.join(conflict_path)
85
86
87@pytest.fixture

Callers

nothing calls this directly

Calls 6

make_consuming_repoFunction · 0.90
cmd_outputFunction · 0.90
git_commitFunction · 0.90
cwdFunction · 0.90
_make_conflictFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected