Skip to content

🐛 Change cwd for coverage reports#479

Merged
Otto-AA merged 3 commits intoboxed:mainfrom
sam-mosleh:fix-coverage-omit
Mar 11, 2026
Merged

🐛 Change cwd for coverage reports#479
Otto-AA merged 3 commits intoboxed:mainfrom
sam-mosleh:fix-coverage-omit

Conversation

@sam-mosleh
Copy link
Contributor

@sam-mosleh sam-mosleh commented Mar 10, 2026

First time installing mutmut — excited to try it out, but ran into a couple of issues on my machine that blocked me from running it at all on my MacBook running Tahoe v26.3.1. This PR fixes both:

Fix 1: Segfault on startup due to setproctitle

On macOS, mutmut crashes immediately with a segfault. After some digging, the culprit is the call to setproctitle which fails simply because forking on macOS is inherently unsafe. I want to be upfront that this may not be the right long-term fix. I went with the simplest change to unblock myself, but I'm very open to guidance from you (@boxed) on the preferred approach.

Fix 2: Coverage configuration not being respected

Even after unblocking the segfault, I noticed that coverage reports were not picking up the project's coverage configuration (e.g., .coveragerc or [tool.coverage] in pyproject.toml). For example omit configs fail to locate files because it is called from the parent mutants directory.

Copy link
Collaborator

@Otto-AA Otto-AA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, the cwd for coverage makes sense and looks good to me. Just a small nitpick there for maintainability.

The setproctitle issue is already covered by #476.

@Otto-AA
Copy link
Collaborator

Otto-AA commented Mar 10, 2026

Even after unblocking the segfault, I noticed that coverage reports were not picking up the project's coverage configuration (e.g., .coveragerc or [tool.coverage] in pyproject.toml). For example omit configs fail to locate files because it is called from the parent mutants directory.

We maybe should also add .coveragerc to the also_copy defaults

Copy link
Contributor Author

@sam-mosleh sam-mosleh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review @Otto-AA

@Otto-AA
Copy link
Collaborator

Otto-AA commented Mar 11, 2026

Thank you for the updates! Also nice that you added the small E2E test for this :)

@Otto-AA Otto-AA merged commit 56fc6a7 into boxed:main Mar 11, 2026
5 checks passed
@sam-mosleh sam-mosleh deleted the fix-coverage-omit branch March 11, 2026 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants