|
10 | 10 |
|
11 | 11 | from tests.framework.pygit2_backend import Pygit2Repo |
12 | 12 | from tests.garbage_data import GARBAGE_MARKERS |
13 | | -from tests.scoring import handle_session_finish, handle_terminal_summary |
14 | 13 |
|
15 | 14 | DIFF_CONTEXT_MAX_BUDGET = int(os.environ.get("DIFF_CONTEXT_MAX_BUDGET", "0")) |
16 | 15 |
|
@@ -41,28 +40,6 @@ def enhanced_build(*args, **kwargs): |
41 | 40 | yield |
42 | 41 |
|
43 | 42 |
|
44 | | -@pytest.fixture(autouse=True) |
45 | | -def _use_pygit2_git(monkeypatch): |
46 | | - from tests.framework import pygit2_backend as pg |
47 | | - from treemapper import diffctx as diffctx_mod |
48 | | - from treemapper.diffctx import git as git_mod |
49 | | - |
50 | | - for target in (git_mod, diffctx_mod): |
51 | | - for name in ( |
52 | | - "parse_diff", |
53 | | - "get_diff_text", |
54 | | - "get_changed_files", |
55 | | - "show_file_at_revision", |
56 | | - "get_deleted_files", |
57 | | - "get_renamed_paths", |
58 | | - "get_untracked_files", |
59 | | - "is_git_repo", |
60 | | - ): |
61 | | - if hasattr(target, name): |
62 | | - monkeypatch.setattr(target, name, getattr(pg, name)) |
63 | | - monkeypatch.setattr(git_mod, "run_git", pg.run_git) |
64 | | - yield |
65 | | - pg.clear_repo_cache() |
66 | 43 |
|
67 | 44 |
|
68 | 45 | def _verify_no_garbage_in_context(context: dict) -> None: |
@@ -253,10 +230,3 @@ def git_repo(tmp_path): |
253 | 230 | return repo_path |
254 | 231 |
|
255 | 232 |
|
256 | | -@pytest.hookimpl(trylast=True) |
257 | | -def pytest_sessionfinish(session, exitstatus): |
258 | | - handle_session_finish(session, exitstatus) |
259 | | - |
260 | | - |
261 | | -def pytest_terminal_summary(terminalreporter, exitstatus, config): |
262 | | - handle_terminal_summary(terminalreporter, exitstatus, config) |
0 commit comments