[issue11332] Increase logging/__init__.py coverage to 97%

2011-04-28 Thread Vinay Sajip
Vinay Sajip added the comment: Though I did not use this patch verbatim, thank you, Oliver, for the impetus to improve coverage. Now, coverage of the logging package is: logging/__init__.py 99% (97%) logging/config.py 89% (85%) logging/handlers.py 65% (60%) where the brackets include branch c

[issue11332] Increase logging/__init__.py coverage to 97%

2011-02-27 Thread Brett Cannon
Brett Cannon added the comment: Testing the documented API is definitely wanted, Oliver. Any change in behaviour needs to be detected to ensure there is not backwards-compatibility regressions without it being intentional. -- ___ Python tracker

[issue11332] Increase logging/__init__.py coverage to 97%

2011-02-27 Thread Oliver Drake
Oliver Drake added the comment: Thanks for the comments and prompt response :) I think I misunderstood the nature and level of these unit tests. I will fix the specific issues you mentioned, and either cut or modify the less useful/too low level tests (e.g. disable). In general I will change

[issue11332] Increase logging/__init__.py coverage to 97%

2011-02-27 Thread Vinay Sajip
Vinay Sajip added the comment: > OK, but acceptance tests do not need to not try to get higher test coverage. >For instance, for testing disable() simply using it and making sure the >outcome >is as expected also works. > > I can understand wanting to avoid some low-level whitebox testin

[issue11332] Increase logging/__init__.py coverage to 97%

2011-02-26 Thread Brett Cannon
Brett Cannon added the comment: OK, but acceptance tests do not need to not try to get higher test coverage. For instance, for testing disable() simply using it and making sure the outcome is as expected also works. I can understand wanting to avoid some low-level whitebox testing, but I don'

[issue11332] Increase logging/__init__.py coverage to 97%

2011-02-26 Thread Vinay Sajip
Vinay Sajip added the comment: @Brett: I've no religious/dogmatic objection to mocking, either, so I agree with your comment. I merely observed that it's not generally implemented in the Python test suite (not that I've made an exhaustive study of it, so I'm open to being corrected on this po

[issue11332] Increase logging/__init__.py coverage to 97%

2011-02-26 Thread Brett Cannon
Brett Cannon added the comment: Just to give an opinion (which can be ignored), I see no issue with mocking if done carefully and properly. It should just be kept to a minimum (and typically be privately exposing certain things that can be overridden). --

[issue11332] Increase logging/__init__.py coverage to 97%

2011-02-26 Thread Vinay Sajip
Vinay Sajip added the comment: Thanks for doing this, I appreciate the effort you've put into it. My comments: 1. Each test class ought to be independent, but they aren't - for example, if I comment out all of your test classes other than LoggerTest, it fails. 2. I try and avoid modifying the

[issue11332] Increase logging/__init__.py coverage to 97%

2011-02-26 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: -> vinay.sajip nosy: +brett.cannon, vinay.sajip stage: -> patch review type: -> behavior versions: +Python 3.3 ___ Python tracker ___

[issue11332] Increase logging/__init__.py coverage to 97%

2011-02-26 Thread Oliver Drake
New submission from Oliver Drake : Purely a modification to test_logging.py with the focus being to increase coverage. coverage.py now measures 97% (when running test_logging.py by itself). I'm not sure if I've followed py-dev unit test conventions exactly, I've created quite a few new test ca