[issue11332] Increase logging/__init__.py coverage to 97%
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 case classes, going by the model of having one unittest test case class for each class defined in the module under test. Comments welcome :) -- components: Tests files: test_logging.diff keywords: patch messages: 129530 nosy: drakeol priority: normal severity: normal status: open title: Increase logging/__init__.py coverage to 97% versions: Python 3.2 Added file: http://bugs.python.org/file20908/test_logging.diff ___ Python tracker <http://bugs.python.org/issue11332> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11332] Increase logging/__init__.py coverage to 97%
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 my approach to be more high level. I will steer away from testing the implementation line by line, but I believe there should be unit tests that enforce the API that is published to the user - i.e. one unit test for every class, method and function, testing inputs, outputs, exception handling and general behavior. So if a developer changes the API or the general behavior of a function he/she should have to change the documentation and the appropriate unit test - or do we want to avoid this type of testing completely? -- ___ Python tracker <http://bugs.python.org/issue11332> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com