[Checkins] [zopefoundation/ZConfig] 010cb2: Reach 100% code coverage (#13)

GitHub noreply at github.com
Tue Feb 14 15:47:55 CET 2017


  Branch: refs/heads/master
  Home:   https://github.com/zopefoundation/ZConfig
  Commit: 010cb2b2d4d2cdc8cd327f9f46a987024cac5b67
      https://github.com/zopefoundation/ZConfig/commit/010cb2b2d4d2cdc8cd327f9f46a987024cac5b67
  Author: Jason Madden <jason+github at nextthought.com>
  Date:   2017-02-14 (Tue, 14 Feb 2017)

  Changed paths:
    A .coveragerc
    M .gitignore
    M .travis.yml
    M CHANGES.rst
    M ZConfig/__init__.py
    A ZConfig/_compat.py
    M ZConfig/cfgparser.py
    M ZConfig/cmdline.py
    M ZConfig/components/logger/factory.py
    M ZConfig/components/logger/handlers.py
    M ZConfig/components/logger/loghandler.py
    M ZConfig/components/logger/tests/test_logger.py
    M ZConfig/datatypes.py
    M ZConfig/info.py
    M ZConfig/loader.py
    M ZConfig/matcher.py
    M ZConfig/schema.py
    M ZConfig/schemaless.py
    M ZConfig/schemaless.txt
    A ZConfig/tests/bad-component.xml
    A ZConfig/tests/bad-component2.xml
    M ZConfig/tests/input/simplesections.xml
    M ZConfig/tests/support.py
    M ZConfig/tests/test_cfgimports.py
    M ZConfig/tests/test_cmdline.py
    M ZConfig/tests/test_config.py
    M ZConfig/tests/test_datatypes.py
    A ZConfig/tests/test_info.py
    M ZConfig/tests/test_loader.py
    A ZConfig/tests/test_matcher.py
    M ZConfig/tests/test_schema.py
    M ZConfig/tests/test_schemaless.py
    M ZConfig/url.py
    M setup.cfg
    M setup.py
    M tox.ini

  Log Message:
  -----------
  Reach 100% code coverage (#13)

* Enable code coverage metrics on CI

Also enable pip caching on CI

* coverage doesn't run on python 3.2 so we need to bump pypy3. Also bump pypy becasue it's much faster.

* Py2/3: Unify handling of StringIO

This helps with our coverage numbers.

Under Python 2, we also start using the C implementation, and avoid
some unnecessary encode/decode cycles, so we might be a tiny bit
faster.

* 100% coverage for __init__.py

The str values of the exceptions.

* 100% coverage for cfgparser.py

Also when it raises an error, preserve the traceback if we're
re-raising. This was invaluable in debugging this.

* 100% coverage for cmdline.py

Had to use one 'no cover' sadly.

* Use ABCMeta and @abstractmethod to prevent manually raising NotImplementedError. This helps coverage numbers.

* Many small coverage fixes, mostly in tests.

Notable:

- float conversion now correctly handles bytes and unicode prohibited
  values on all versions.
- remove a duplicate test function from test_logger.
- remove test support in test_logger for < 2.7

* 100% for handlers.py; needed one NO COVER

* 100% coverage for loghandler.py

* 100% coverage for loghandler.py

- Fix StartupHandler on Python 3.

* 100% coverage for datatypes.

* 100% coverage for info.py

- SectionType has a few no-covers for exception cases that I didn't
  feel like mocking up all the conditions for.

- Make the type objects, well, objects. They had a ``__metaclass__``
  statement that I think did the same thing on Python 2.

* 100% coverage for matcher.py

There are unfortunately a few no-covers because of very deeply nested
functions that are difficult to mock around.

There is at least one genuine bug fix.

* 100% coverage for loader.py

* 100% coverage for schema.py

* 100% coverage for url.py. Unfortunately I had to resort to no cover because I couldn't come up with counter examples.

* bugfix on python 3

* remove last remaining use of __metaclass__ and simplify reraising

* remove alternate spelling no longer used

* typos from reviewers

* more consistently handle the aliases

* Simplify most uses of reraise via a helper function




More information about the checkins mailing list