This site is an archive; learn more about 8 years of OpenHatch.

[OH-Dev] Logging and Testing Improvements for OpenHatch

Asheesh Laroia lists at asheesh.org
Sat May 10 07:12:08 UTC 2014


Wow!

py.test --durations=10 sounds amazing.

+1 to the rest of your mail.


On Sun, May 4, 2014 at 11:05 PM, Carol Willing <
willingc at willingconsulting.com> wrote:

>  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
>
>
> _______________________________________________
> Devel mailing list
> Devel at lists.openhatch.org
> http://lists.openhatch.org/mailman/listinfo/devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openhatch.org/pipermail/devel/attachments/20140510/d4b5d9df/attachment.html>


More information about the Devel mailing list