-
Notifications
You must be signed in to change notification settings - Fork 431
Get to 100% code coverage #212
Comments
This will "fix" #209 among other things. Overall, test status of this library is quite bad and the uber-module |
First order of business, separate out import madness from |
Until now, code that depended on PyCrypto or OpenSSL was defined conditionally (e.g. indented) in `crypt.py`. Rather than grouping all these together, we factor out the library specific behavior into standalone modules (but make the modules private / protected). In addition, added a `_helpers.py` module with common behavior that was previously defined in multiple places. Finally, beefed up some test cases so that the three newly added modules had 100% test coverage. Towards googleapis#212.
Until now, code that depended on PyCrypto or OpenSSL was defined conditionally (e.g. indented) in `crypt.py`. Rather than grouping all these together, we factor out the library specific behavior into standalone modules (but make the modules private / protected). In addition, added a `_helpers.py` module with common behavior that was previously defined in multiple places. Finally, beefed up some test cases so that the three newly added modules had 100% test coverage. Towards googleapis#212.
As of right now (6a9308a, after #284 merged), here is the output of
I haven't yet figured out how to build in |
@jonparrott You previously mentioned that it was possible to collect coverage from multiple runs. I am looking to do this for Care to help? Shall I file a bug and we take it up there / have a PR which closes that bug? |
Yep, file a bug. I'll see what I can do. |
As per discussion with @nathanielmanistaatgoogle in #288, need to be sure to:
|
After doing #293 I wanted to make sure I hadn't reduced the coverage of
Many of them are abstract methods that are easy to test (i.e. |
Yes sure. I thinks the apps.py can be tested since we're no longer running Django tests for 2.6 I will either cover django_orm or just rewrite as my next task. |
👍 on the rewrite |
Might want to work upstream from #353 to avoid merge headaches |
@waprin We had previously discussed you getting UPDATE: While we're at it, |
I believe apps is not covered because it's only part of later versions of Django that don't support 2.6. Now given coverage runs under Python 2.7 I forget the specific reason for why it's not covered but it was something along those lines, I'd have to revisit. |
|
Well there is a pragma nocover in there so it's basically 0% of 0 (well, except for not testing |
I consider this a successful week! |
oauth2client.client
oauth2client.contrib.appengine
oauth2client.contrib.django_orm
oauth2client.contrib.django_util.apps
oauth2client.contrib.locked_file
oauth2client.contrib.multistore_file
oauth2client.tools
oauth2client.util
tests.contrib.test_multistore_file
(Getting to 100% line coverage in tests. #431, 3 branches: 1, 2, 3)tests.test_client
(Getting to 100% line coverage in tests. #431, See summary)tests.test_file
(Getting to 100% line coverage in tests. #431, See summary)oauth2client.__init__
oauth2client._helpers
oauth2client._openssl_crypt
oauth2client._pycrypto_crypt
oauth2client.clientsecrets
(PR: Getting to 100% coverage for clientsecrets module. #278)oauth2client.contrib.__init__
oauth2client.contrib.django_util.__init__
oauth2client.contrib.django_util.decorators
oauth2client.contrib.django_util.signals
oauth2client.contrib.django_util.site
oauth2client.contrib.django_util.storage
oauth2client.contrib.django_util.views
oauth2client.contrib.flask_util
(Issue: Get flask_util to 100% code coverage #277, PR: Increasing coverage for flask_util #282)oauth2client.contrib.keyring_storage
(PR: 100 percent coverage keyring storage #279)oauth2client.crypt
(PR: Getting to 100% coverage for crypt module. #290)oauth2client.devshell
(PR: Getting to 100% coverage for devshell module. #284)oauth2client.file
oauth2client.gce
(PR: Getting to 100% coverage for gce module. #280)yay it's goneoauth2client.old_run
(PR: Removing old_run module. #285)oauth2client.service_account
oauth2client.xsrfutil
(PR: Getting to 100% coverage for xsrfutil module. #281)tests.__init__
tests.contrib.__init__
tests.contrib.test_appengine
(See summary)tests.contrib.test_django_orm
tests.contrib.test_django_settings
tests.contrib.test_django_util
tests.contrib.test_flask_util
tests.contrib.test_keyring_storage
tests.http_mock
(See summary)tests.test__helpers
tests.test__pycrypto_crypt
tests.test_clientsecrets
(See summary)tests.test_crypt
tests.test_devshell
(See summary)tests.test_gce
tests.test_jwt
(See summary)tests.test_service_account
(See summary)tests.test_tools
(See summary)tests.test_util
tests.test_xsrfutil
(See summary)The text was updated successfully, but these errors were encountered: