1 We have pytest and pluggy in vendor-packages.
3 --- coverage-7.6.5/tests/test_cmdline.py.orig
4 +++ coverage-7.6.5/tests/test_cmdline.py
7 assert lines[0].startswith("-- premain ----")
9 - assert re.search(fr"{s}site-packages{s}_pytest{s}", out)
10 - assert re.search(fr"{s}site-packages{s}pluggy{s}", out)
11 + assert re.search(fr"{s}vendor-packages{s}_pytest{s}", out)
12 + assert re.search(fr"{s}vendor-packages{s}pluggy{s}", out)
13 assert re.search(fr"(?m)^\s+test_debug_premain : .*{s}tests{s}test_cmdline.py:\d+$", out)
14 assert re.search(fr"(?m)^\s+command_line : .*{s}coverage{s}cmdline.py:\d+$", out)
15 assert re.search(fr"(?m)^\s+do_debug : .*{s}coverage{s}cmdline.py:\d+$", out)
16 --- coverage-7.6.5/tests/test_debug.py.orig
17 +++ coverage-7.6.5/tests/test_debug.py
19 py = "pypy" if env.PYPY else "python"
20 majv, minv = sys.version_info[:2]
21 pylib = f"lib{s}{py}{majv}.{minv}{sys.abiflags}"
22 - assert len(re_lines(fr"{s}{pylib}{s}site-packages{s}_pytest", stack_text)) > 3
23 - assert len(re_lines(fr"{s}{pylib}{s}site-packages{s}pluggy", stack_text)) > 3
24 + assert len(re_lines(fr"{s}{pylib}{s}vendor-packages{s}_pytest", stack_text)) > 3
25 + assert len(re_lines(fr"{s}{pylib}{s}vendor-packages{s}pluggy", stack_text)) > 3
26 assert not re_lines(r" 0x[0-9a-fA-F]+", stack_text) # No frame ids
27 stack = stack_text.splitlines()
28 assert len(stack) > 25
30 def test_short_stack_short_filenames(self) -> None:
31 stack_text = f_one(full=True, short_filenames=True)
33 - assert not re_lines(r"site-packages", stack_text)
34 + assert not re_lines(r"vendor-packages", stack_text)
35 assert len(re_lines(fr"syspath:{s}_pytest", stack_text)) > 3
36 assert len(re_lines(fr"syspath:{s}pluggy", stack_text)) > 3
38 --- coverage-7.6.5/coverage/debug.py.orig
39 +++ coverage-7.6.5/coverage/debug.py
41 functions can call this and not be included in the result.
43 If `full` is true, then include all frames. Otherwise, initial "boring"
44 - frames (ones in site-packages and earlier) are omitted.
45 + frames (ones in vendor-packages and earlier) are omitted.
47 `short_filenames` will shorten filenames using `short_filename`, to reduce
48 the amount of repetitive noise in stack traces.
51 "<string>", # pytest-xdist has string execution.
52 r"\bigor.py$", # Our test runner.
53 - r"\bsite-packages\b", # pytest etc getting to our tests.
54 + r"\bvendor-packages\b", # pytest etc getting to our tests.
57 stack: Iterable[inspect.FrameInfo] = inspect.stack()[:skip:-1]