python logging and tests