Make it clearer that mutation happens in-place
See original GitHub issueAs I have never run mutmut
before, I left it running in the background while I continued to do some work, and discovered that the mutations happen on the codebase in-place. I think this is totally reasonable, but it didn’t match my assumptions approaching the tool, so I ended up (a) not able to continue working against the codebase, and (b) probably invalidating some of the tests that mutmut
performed by writing files while it was running.
It’d be good if this were clearer!
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Washing your code: avoid mutation - Artem Sapegin
Mutation may lead to unexpected and hard-to-debug issues, where data becomes incorrect somewhere, and you have no idea where it happens.
Read more >Mutation, Repair and Recombination - Genomes - NCBI - NIH
Mutation and recombination can both be defined as processes that result in changes to a genome, but they are unrelated and we must...
Read more >How do we classify mutations in biology? - CC
Silent mutations are mutations that do not result in a change in phenotype. This can occur if: A change in the nucleotide sequence...
Read more >Why You Should Probably Never Use pandas inplace=True
This article will explain what the pandas inplace=True keyword means, how it behaves, and why you should probably never use it.
Read more >Mutants and Mutations - The Uncanny X-Flies
How do mutations occur. ... to produce energy (of course the cells have mechanisms to clear these molecules and protect from their effects)....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Good luck with that! If the mutants aren’t really testable, we are discussing more advanced whitelisting ideas in https://github.com/boxed/mutmut/issues/47
@boxed , Apology accepted. I really appreciate that. I understand about being sleep deprived. I will also apologize for becoming defensive and retaliatory.
Now on to business. I like your idea about changing
mutmut apply
tomutmut write
. I do think that would help give an additional indication that something could be changed.I also agree that the changes you made in the documentation are much better than the original.
Although I still like my idea of having the extra statement similar to what I wrote above (although I am biased), I think you’ve definitely made some improvements in clarity. I am looking at this from the viewpoint of someone who is an inexperienced programmer and who is still being bombarded with a lot of new concepts. There are times when some points of a new concept are not immediately absorbed. I do concede that you do have (and originally had, as well) a statement that should have caught my eye, but I failed to catch it.
I also have a question about mutmut when used in a project using SQLAlchemy. I’ll pose my question here but if you think this is not the appropriate place for this, please point me in the right direction.
Should the classes that are used for mapping SQL tables be mutation tested? and if so, how do I go about fixing my classes to kill the mutations? I can supply specific examples of code that I am talking about, if need be.
I have not seen anything online that addresses this issue. These questions could simply be due to my lack of experience.
EDIT: After writing this earlier, I have figured a way to test at least some of the functions in my SQLAlchemy classes that I was confused about. I’ll try to build on this to see if I can get most, if not all of them testable.