[OH-Dev] Logging and Testing Improvements for OpenHatch
Carol Willing
willingc at willingconsulting.com
Mon May 5 06:05:25 UTC 2014
Hi Asheesh,
Thanks for the feedback. I agree with your thoughts.
I'll be submitting several smaller pull requests, each with a focused
step toward improving the test and logging output. This should make it
easier for code review.
>
> In general, huge +1 to never using "print" and always using a call to
> logger or logging.
>
> Django provides some kind of framework for helping with this, but I
> haven't gotten around to understanding it yet.
I'll be sure to check the logging available in both Python and Django
> > Suggestion #1: "Ability to run tests and suppress other info
> (logging and print statements) from output to the console."
>
> This gets my +1 !
>
Great!
> >Suggestion #2: More flexibility in logging information and output to
> files to aid in debugging
>
> This gets my +0, so long as that flexibility doesn't carry a large
> cognitive burden for contributors/developers.
>
> I would secretly probably be equally happy with a giant switch to
> enable/disable a firehose, since at the point where you want to see
> anything, it's sometimes hard to know which things to enable.
>
> Having said that, I'm fine with more flexibility, so long as it is
> easy for everyone. I think you're in a good position to make those
> kinds of judgment calls.
The firehose switch of quiet vs output will be the first step. Beyond
that, I think keeping it simple and relying on the flexibility that
already comes with Python and Django would be my approach. The
flexibility would simply be the ability to set the level of message
logged which is already part of the logging library.
>
> > Suggestion #3: Better documentation of tests and test runners as
> well as logging
>
> Mega +1.
>
> Yesterday I referred some people toward
> https://openhatch.org/wiki/Automated_testing which was useful, but
> surely could be better.
+1 on migrating the wiki content to Read the Docs too.
>
I realized that we can use pytest to identify the tests which are the
slowest to run. 'py.test --durations=10' will return the ten slowest
tests. Some good stuff in py.test for profiling tests and understanding
test structure of a code base with the added benefit that it doesn't
need to be merged into the oh-mainline code :-)
Thanks,
Carol
--
Carol Willing
Developer
Willing Consulting
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openhatch.org/pipermail/devel/attachments/20140504/a3ea1c27/attachment.html>
More information about the Devel
mailing list