Tagged Questions
6
votes
3answers
386 views
Is having a switch to turn mocking on or off a code smell?
I have a method that looks like this:
def foobar(mock=False, **kwargs):
# ... snipped
foobar actually makes several calls to Amazon S3 and returns a composed result.
In order to make this ...
2
votes
1answer
282 views
Is @staticmethod proliferation a code smell?
Consider a Python class with a number of @staticmethod methods and few instance methods. The static methods don't accept an instance of the defining class as parameters.
Do you think that all these ...