Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

also_copy overwrites mutants, run doesn't copy over non-python files in source folders #371

Closed
DomAmato opened this issue Mar 17, 2025 · 1 comment · Fixed by #372
Closed

Comments

@DomAmato
Copy link
Contributor

I am not sure what is more the issue. That the mutant generation only copies over python files or that the also_copy command overwrites the mutants since it runs afterwards.

Basically I have a repo with a bunch of schema definitions in JSON files and a few other files in the source directory. These files need to be present for the tests to run but when doing mutmut run it doesn't copy the files over since it only looks for python source files when copying them into the mutant folder and the tests fail.

I could specify the dozens of schema files into also_copy but that is extremely tedious and prone to failure anytime a filename is changed or a new file is added.

I think the solution would be to copy over the entire source directory then make the mutants and overwrite the source files with the new mutated files instead. I think that would solve both issues I am running into and just be a more resilient option. The also_copy config option could still exist to make sure files outside the source dir are included but only copying python source files is limiting.

@boxed
Copy link
Owner

boxed commented Mar 18, 2025

Yea, makes sense.

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 a pull request may close this issue.

2 participants