Skip to content

Commit fb1bcba

Browse files
authored
Merge pull request #1276 from onekey-sec/renovate/pytest-cov-7.x
chore(deps): update dependency pytest-cov to v7
2 parents fe4647a + 859bffa commit fb1bcba

File tree

4 files changed

+8
-21
lines changed

4 files changed

+8
-21
lines changed

package.nix

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,17 +126,13 @@ python3.pkgs.buildPythonApplication {
126126
with python3.pkgs;
127127
[
128128
pytestCheckHook
129-
pytest-cov
129+
pytest-cov-stub
130130
versionCheckHook
131131
]
132132
++ runtimeDeps;
133133

134134
versionCheckProgramArg = "--version";
135135

136-
pytestFlagsArray = [
137-
"--no-cov"
138-
];
139-
140136
passthru = {
141137
# helpful to easily add these to a nix-shell environment
142138
inherit runtimeDeps;

pyproject.toml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ dev = [
4343
"atheris>=2.3,<3.0; sys_platform == 'linux' and python_version < '3.12'",
4444
"pre-commit>=3.5,<5.0",
4545
"pyright>=1.1.349",
46-
"pytest-cov>=3,<7",
46+
"pytest-cov>=7,<8",
4747
"pytest>=8.0.0",
4848
"pyyaml>=6.0.1",
4949
"ruff==0.12.12",
@@ -151,7 +151,7 @@ parametrize-names-type = "csv"
151151
"attr".msg = "Use `attrs` (with an 's') instead"
152152

153153
[tool.pytest.ini_options]
154-
addopts = "--cov=unblob --cov=tests --cov-branch --cov-fail-under=90"
154+
addopts = "--cov --cov-fail-under=90"
155155
norecursedirs = """
156156
*.egg
157157
*_extract
@@ -162,15 +162,10 @@ norecursedirs = """
162162
tests/integration
163163
"""
164164

165-
[tool.coverage.paths]
166-
source = ["tests", "unblob"]
167-
168165
[tool.coverage.run]
169166
branch = true
170167
concurrency = ["multiprocessing"]
171-
parallel = true
172-
sigterm = true
173-
source = ["tests", "unblob"]
168+
source = ["python", "tests"]
174169

175170
[tool.coverage.report]
176171
fail_under = 90

python/unblob/testing.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import pytest
1010
from lark.lark import Lark
1111
from lark.visitors import Discard, Transformer
12-
from pytest_cov.embed import cleanup_on_sigterm
1312

1413
from unblob.finder import build_hyperscan_database
1514
from unblob.logging import configure_logger
@@ -24,9 +23,6 @@ def configure_logging(tmp_path_factory):
2423
log_path = tmp_path_factory.mktemp("logs") / "unblob.log"
2524
configure_logger(verbosity_level=3, extract_root=extract_root, log_path=log_path)
2625

27-
# https://pytest-cov.readthedocs.io/en/latest/subprocess-support.html#if-you-use-multiprocessing-process
28-
cleanup_on_sigterm()
29-
3026

3127
def gather_integration_tests(test_data_path: Path):
3228
# Path.glob() trips on some invalid files

uv.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)