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

copy full src dir before creating mutants #372

Merged
merged 3 commits into from
Mar 20, 2025
Merged

Conversation

DomAmato
Copy link
Contributor

The current process only copies python files but tests might rely on other files that exist within the src directories in a repo. This PR copies the full src directories first, creates and overwrites the files with the mutants and then copies the files specified in also_copy

fixes #371

current process only copies python files
@@ -257,10 +261,6 @@ def pragma_no_mutate_lines(source):
def create_mutants_for_file(filename, output_path):
input_stat = os.stat(filename)

if output_path.exists() and output_path.stat().st_mtime == input_stat.st_mtime:
Copy link
Owner

Choose a reason for hiding this comment

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

What is this deletion? This PR should be about just copying the file tree as the title says.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I explained it in a previous comment but if that code is there it doesn't create the mutants because output_path.stat().st_mtime == input_stat.st_mtime will be true so either this logic needs to be modified or it removed for it to work with the shutil.copytree

Copy link
Owner

Choose a reason for hiding this comment

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

Ah. My bad.

@boxed boxed merged commit b6fc4bc into boxed:main Mar 20, 2025
5 checks passed
@boxed
Copy link
Owner

boxed commented Mar 20, 2025

Thanks!

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.

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