开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

log pattern, just a note


 

self.log = self.log + "testmethod"

This seems to be a little smelly to me, because we
instrument the production code with functionality for
testing purposes.

But with pyhton, I cannot show an alternative.

It is less smelly if the logging is needed anyway and
I "reuse" it for testing, like Log4J and StringAppender
where I can set the loglevel in the testcase, leaving
the production runtime untouched.

cheers
Mittie