mutmut
mutmut copied to clipboard
Mutate str methods?
Is there any interest in adding support for mutating methods on str objects? For example, s.lower() would be mutated to s.upper(), or s.strip() would be mutated to s. Of course, not all methods have a clear mutation (e.g. str.maketrans()) but I think enough of them do that even partial coverage could be useful.
Interesting idea. I guess the problem would be to know if it's a str at all, but maybe just mutating method names with a dict would be 99% of the way and would be easy to add configuration for to test more stuff.