When writing unit tests, I sometimes cut and paste a test and don\'t remember to change the method name. This results in overwriting the previous test, effectively hiding i
If you run pylint over your code, it will inform you when you have overwritten another method:
For example, I ran this:
class A(object):
def blah(self):
print("Hello World!")
def blah(self):
print("I give up!")
In this online pylint checker. Besides all the missing docstrings and such, I get this:
E: 5:A.blah: method already defined line 2