Skip to content

Commit fa631d2

Browse files
committed
fix(ci): pin mutmut 3.5+, exclude module-level init from mutation
mutmut 3.x trampoline crashes when called during module import (parsers/__init__.py creates FragmentationEngine at module level). Exclude it from mutation and remove redundant pip install mutmut.
1 parent 0858b52 commit fa631d2

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,7 @@ jobs:
160160
- name: Install dependencies
161161
run: |
162162
python -m pip install --upgrade pip
163-
pip install -e .[dev]
164-
pip install mutmut
163+
pip install -e ".[dev]"
165164
166165
- name: Run mutation testing
167166
run: |

pyproject.toml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ dev = [
147147
"pytest-cov>=3.0,<8.0",
148148
"pytest-xdist>=3.0,<4.0",
149149
"hypothesis>=6.0,<7.0",
150-
"mutmut>=2.0,<4.0",
150+
"mutmut>=3.5,<4.0",
151151
"coverage>=7.0,<8.0",
152152
# Quality checks
153153
"ruff>=0.4,<1.0",
@@ -168,6 +168,14 @@ dev = [
168168
"urllib3>=2.6.0",
169169
]
170170

171+
[tool.mutmut]
172+
paths_to_mutate = ["src/treemapper/"]
173+
tests_dir = ["tests/"]
174+
do_not_mutate = [
175+
"src/treemapper/diffctx/parsers/__init__.py",
176+
"src/treemapper/diffctx/stopwords.py",
177+
]
178+
171179
[tool.setuptools.dynamic]
172180
version = { attr = "treemapper.version.__version__" }
173181

0 commit comments

Comments
 (0)