jendrikseipp / vulture

Find dead Python code
MIT License
3.41k stars 150 forks source link

Auto ignore classes that have the unittest.TestCase base class #242

Closed djh82 closed 3 years ago

djh82 commented 3 years ago

We tend to store unittests in the same script that we're testing, so the current auto ignoring of tests that live in a test/tests directory is not suitable for us.

It would seem, rather than guessing that tests are always in a test/tests directory (or indeed that non-tests wouldn't be stored in such a directory), that it would be useful to check the base class?

jendrikseipp commented 3 years ago

Unfortuntately, checking the base class (or the class ancestry) would make the code much more involved. Therefore, this is currently not a goal.