-
Notifications
You must be signed in to change notification settings - Fork 430
Adding tests to coverage report. #297
Adding tests to coverage report. #297
Conversation
I wrote a little script to make links to all the uncovered lines in tests: tests/http_mock: Line(s) 35 (YAGNI test behavior) I have gone through by hand and classified them. |
44e96b6
to
84a5d09
Compare
The two examples of |
There are 29 uses of As for Py2.6 support, AFAIK |
That odd one out that you found looks superfluous and like it could be eliminated today without affecting the correctness or quality of the test. As for the others if I wanted to make a case for addressing them I'm not sure whether I'd favor making use of unittest2 or dropping support for 2.6. :-) 2.6 is really, really old... |
Added tests to coverage report.
I agree it is superfluous. The majority of these uncovered lines are superfluous / YAGNI. See googleapis/google-cloud-python#995 for my thoughts on supporting Py2.6. In particular, Oct. 29 2013 "retired" Py2.6 (retired by He actually said since Google pays people to support these libraries, his advice doesn't fully translate over. |
@nathanielmanistaatgoogle Should I file a "Drop support for Python 2.6" issue for |
Sure. I don't know what the answer will be but it's worth at least asking the question. |
This reveals there are dead lines in many of our tests. Some are innocuous, like
https://github.com/google/oauth2client/blob/f15e80ee5a4ff07803113204f6b8eda9be65f758/tests/test_xsrfutil.py#L296
https://github.com/google/oauth2client/blob/f15e80ee5a4ff07803113204f6b8eda9be65f758/tests/test_tools.py#L31
while others are caused by using
self.fail()
statements which never occur:https://github.com/google/oauth2client/blob/f15e80ee5a4ff07803113204f6b8eda9be65f758/tests/test_service_account.py#L66
https://github.com/google/oauth2client/blob/f15e80ee5a4ff07803113204f6b8eda9be65f758/tests/test_service_account.py#L72
At
HEAD
right now,tox -e cover
gets line coverage onWith this PR, the following files also get line coverage (this is the point of
--cover-tests
BTW):