{"action":"created","issue":{"url":"https://api.github.com/repos/pypa/warehouse/issues/906","labels_url":"https://api.github.com/repos/pypa/warehouse/issues/906/labels{/name}","comments_url":"https://api.github.com/repos/pypa/warehouse/issues/906/comments","events_url":"https://api.github.com/repos/pypa/warehouse/issues/906/events","html_url":"https://github.com/pypa/warehouse/issues/906","id":125380056,"number":906,"title":"Figure out why coverage is inaccurate in local development","user":{"login":"dstufft","id":145979,"avatar_url":"https://avatars.githubusercontent.com/u/145979?v=3","gravatar_id":"","url":"https://api.github.com/users/dstufft","html_url":"https://github.com/dstufft","followers_url":"https://api.github.com/users/dstufft/followers","following_url":"https://api.github.com/users/dstufft/following{/other_user}","gists_url":"https://api.github.com/users/dstufft/gists{/gist_id}","starred_url":"https://api.github.com/users/dstufft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dstufft/subscriptions","organizations_url":"https://api.github.com/users/dstufft/orgs","repos_url":"https://api.github.com/users/dstufft/repos","events_url":"https://api.github.com/users/dstufft/events{/privacy}","received_events_url":"https://api.github.com/users/dstufft/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-01-07T11:53:22Z","updated_at":"2016-01-28T11:34:34Z","closed_at":"2016-01-28T11:34:34Z","body":"From #905\r\n\r\nFor some reason, we only have 99% coverage when I run ``make tests`` locally, but it has 100% coverage in the CI. The output looks like:\r\n\r\n```console\r\n$ python -m coverage report -m\r\nName                                               Stmts   Miss Branch BrPart  Cover   Missing\r\n----------------------------------------------------------------------------------------------\r\nwarehouse/__init__.py                                  2      0      0      0   100%\r\nwarehouse/accounts/__init__.py                        29      0      8      0   100%\r\nwarehouse/accounts/auth_policy.py                     14      0      2      0   100%\r\nwarehouse/accounts/forms.py                           17      0      6      0   100%\r\nwarehouse/accounts/interfaces.py                       1      0      0      0   100%\r\nwarehouse/accounts/models.py                          44      0      4      0   100%\r\nwarehouse/accounts/services.py                        48      0     14      0   100%\r\nwarehouse/accounts/views.py                           46      0     12      0   100%\r\nwarehouse/aws.py                                      14      0      4      0   100%\r\nwarehouse/cache/__init__.py                            0      0      0      0   100%\r\nwarehouse/cache/http.py                               53      0     16      0   100%\r\nwarehouse/cache/origin/__init__.py                    76      0     19      0   100%\r\nwarehouse/cache/origin/fastly.py                      50      0     18      0   100%\r\nwarehouse/cache/origin/interfaces.py                   1      0      0      0   100%\r\nwarehouse/celery.py                                   47      0      6      0   100%\r\nwarehouse/classifiers/__init__.py                      0      0      0      0   100%\r\nwarehouse/classifiers/models.py                       13      0      0      0   100%\r\nwarehouse/cli/__init__.py                             18      0      4      0   100%\r\nwarehouse/cli/db/__init__.py                           2      0      2      0   100%\r\nwarehouse/cli/db/branches.py                           6      0      0      0   100%\r\nwarehouse/cli/db/current.py                            6      0      0      0   100%\r\nwarehouse/cli/db/downgrade.py                          7      0      0      0   100%\r\nwarehouse/cli/db/heads.py                              7      0      0      0   100%\r\nwarehouse/cli/db/history.py                            7      0      0      0   100%\r\nwarehouse/cli/db/merge.py                              9      0      0      0   100%\r\nwarehouse/cli/db/revision.py                          11      0      0      0   100%\r\nwarehouse/cli/db/show.py                               7      0      0      0   100%\r\nwarehouse/cli/db/stamp.py                              7      0      0      0   100%\r\nwarehouse/cli/db/upgrade.py                            7      0      0      0   100%\r\nwarehouse/cli/search/__init__.py                       2      0      2      0   100%\r\nwarehouse/cli/search/reindex.py                       45      0      6      0   100%\r\nwarehouse/cli/shell.py                                34      0      2      0   100%\r\nwarehouse/config.py                                  164      0     39      0   100%\r\nwarehouse/csrf.py                                     78      0     30      0   100%\r\nwarehouse/db.py                                       55      0      6      0   100%\r\nwarehouse/filters.py                                  46      0     10      0   100%\r\nwarehouse/forms.py                                    35      0     10      0   100%\r\nwarehouse/i18n/__init__.py                            10      0      0      0   100%\r\nwarehouse/i18n/filters.py                             11      0      0      0   100%\r\nwarehouse/i18n/l20n.py                                 7      0      0      0   100%\r\nwarehouse/legacy/__init__.py                           0      0      0      0   100%\r\nwarehouse/legacy/action_routing.py                    10      0      0      0   100%\r\nwarehouse/legacy/api/__init__.py                       0      0      0      0   100%\r\nwarehouse/legacy/api/json.py                          36      0     11      1    98%   118->-118\r\nwarehouse/legacy/api/pypi.py                         290      0    148      1    99%   630->-649\r\nwarehouse/legacy/api/simple.py                        19      0      2      0   100%\r\nwarehouse/legacy/api/xmlrpc.py                        90      0     40      1    99%   50->-50\r\nwarehouse/logging.py                                  22      0      2      0   100%\r\nwarehouse/packaging/__init__.py                        9      0      0      0   100%\r\nwarehouse/packaging/interfaces.py                      1      0      0      0   100%\r\nwarehouse/packaging/models.py                        188      0     24      0   100%\r\nwarehouse/packaging/search.py                         41      0      4      0   100%\r\nwarehouse/packaging/services.py                       57      0     14      0   100%\r\nwarehouse/packaging/views.py                          47      0     12      0   100%\r\nwarehouse/raven.py                                    29      0      2      0   100%\r\nwarehouse/redirects.py                                11      0      0      0   100%\r\nwarehouse/routes.py                                   27      0      0      0   100%\r\nwarehouse/search.py                                   31      0      2      0   100%\r\nwarehouse/sessions.py                                173      0     34      0   100%\r\nwarehouse/sitemap/__init__.py                          0      0      0      0   100%\r\nwarehouse/sitemap/models.py                            3      0      0      0   100%\r\nwarehouse/sitemap/views.py                            32      0     14      0   100%\r\nwarehouse/utils/__init__.py                            3      0      0      0   100%\r\nwarehouse/utils/attrs.py                               6      0      4      0   100%\r\nwarehouse/utils/compression.py                        40      0     14      0   100%\r\nwarehouse/utils/crypto.py                             14      0      0      0   100%\r\nwarehouse/utils/gravatar.py                            9      0      2      0   100%\r\nwarehouse/utils/http.py                               30      0     12      0   100%\r\nwarehouse/utils/paginate.py                           23      0      6      0   100%\r\nwarehouse/utils/row_counter.py                         7      0      0      0   100%\r\nwarehouse/utils/static.py                             12      0      2      0   100%\r\nwarehouse/utils/wsgi.py                               28      0     14      0   100%\r\nwarehouse/views.py                                    39      0      6      0   100%\r\n----------------------------------------------------------------------------------------------\r\nTOTAL                                               2363      0    589      3    99%\r\n```\r\n\r\nI'm guessing this is some nonsense with the peephole optimizer... but I have no idea why it would only affect it when run locally and not in Travis, which are both using CPython 3.5.1."},"comment":{"url":"https://api.github.com/repos/pypa/warehouse/issues/comments/176135749","html_url":"https://github.com/pypa/warehouse/issues/906#issuecomment-176135749","issue_url":"https://api.github.com/repos/pypa/warehouse/issues/906","id":176135749,"user":{"login":"dstufft","id":145979,"avatar_url":"https://avatars.githubusercontent.com/u/145979?v=3","gravatar_id":"","url":"https://api.github.com/users/dstufft","html_url":"https://github.com/dstufft","followers_url":"https://api.github.com/users/dstufft/followers","following_url":"https://api.github.com/users/dstufft/following{/other_user}","gists_url":"https://api.github.com/users/dstufft/gists{/gist_id}","starred_url":"https://api.github.com/users/dstufft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dstufft/subscriptions","organizations_url":"https://api.github.com/users/dstufft/orgs","repos_url":"https://api.github.com/users/dstufft/repos","events_url":"https://api.github.com/users/dstufft/events{/privacy}","received_events_url":"https://api.github.com/users/dstufft/received_events","type":"User","site_admin":false},"created_at":"2016-01-28T11:34:34Z","updated_at":"2016-01-28T11:34:34Z","body":"This appears to be fixed now without having done anything myself, ¯\\_(ツ)_/¯."}}