mutmut icon indicating copy to clipboard operation
mutmut copied to clipboard

exclude_paths doesn't do what you expect

Open boxed opened this issue 5 years ago • 1 comments

https://github.com/henrikh/mutmut-exclude-path for a reproduction scenario.

Basically paths_to_exclude=some/folder/ should be understood correctly.

boxed avatar Nov 23 '20 08:11 boxed

@boxed I guess this happens by the way traversing with os.walk is done.

If you comsume subdirs like in https://github.com/boxed/mutmut/blob/c59fc4b99f03abfe409ba8c0f90e4bbd8a9d574a/mutmut/init.py#L1223 you have only B , not main/B.

Give this a try:

[mutmut]
paths_to_mutate=main
paths_to_exclude=B
runner=python -m unittest discover tests --failfast

M3ssman avatar Feb 14 '21 11:02 M3ssman