Coder Social home page Coder Social logo

Comments (6)

tisto avatar tisto commented on July 18, 2024 1

Wohoo! Yeah. Will close this one and create a new ticket...

from plone.restapi.

tisto avatar tisto commented on July 18, 2024
Name                                          Stmts   Miss  Cover   Missing
---------------------------------------------------------------------------
src/plone/restapi/__init__                        2      0   100%   
src/plone/restapi/demo/__init__                   0      0   100%   
src/plone/restapi/demo/demo                       0      0   100%   
src/plone/restapi/interfaces                      5      0   100%   
src/plone/restapi/serializer                     73      7    90%   116, 122, 190-197
src/plone/restapi/services                        8      2    75%   9, 33
src/plone/restapi/testing                        17      0   100%   
src/plone/restapi/tests/__init__                  0      0   100%   
src/plone/restapi/tests/test_documentation      135      0   100%   
src/plone/restapi/tests/test_error_handling      50     30    40%   37-48, 52-65, 72-84, 91-113
src/plone/restapi/tests/test_serializer          73      0   100%   
src/plone/restapi/tests/test_services            75      0   100%   
src/plone/restapi/tests/test_setup               13      0   100%   
src/plone/restapi/tests/test_utils               41      0   100%   
src/plone/restapi/utils                          25      0   100%   
---------------------------------------------------------------------------
TOTAL                                           517     39    92%   

from plone.restapi.

lukasgraf avatar lukasgraf commented on July 18, 2024

Tests using a z2.ZSERVER fixture, like those on PLONE_RESTAPI_FUNCTIONAL_TESTING, don't seem to be picked up by coverage.py.

I'm assuming this is because coverage.py can't trace threads that are instantiated using the low-level thread interface instead of the higher level threading module (see coveragepy#244 and ZServer.PubCore.ZRendezvous).

So... Functional tests using a Z2 server and the requests module won't have their coverage recorded.

from plone.restapi.

tisto avatar tisto commented on July 18, 2024

Yep. That seems to be the problem. This is not limited to plone.restapi though.

from plone.restapi.

tomgross avatar tomgross commented on July 18, 2024

You can enforce a minimun of tests to be covered with nose:

--cover-min-percentage=DEFAULT
Minimum percentage of coverage for tests to pass [NOSE_COVER_MIN_PERCENTAGE]

See:
http://nose.readthedocs.org/en/latest/plugins/cover.htm

from plone.restapi.

witsch avatar witsch commented on July 18, 2024

Test coverage is back to 96% with #238, but the rest will probably take some (tedious) work. I support you might want to close this anyway… :)

from plone.restapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.