Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit test coverage below 100% #335

Closed
tseaver opened this issue Jun 24, 2021 · 3 comments · Fixed by #345
Closed

Unit test coverage below 100% #335

tseaver opened this issue Jun 24, 2021 · 3 comments · Fixed by #345
Assignees
Labels
api: bigtable Issues related to the googleapis/python-bigtable API. type: process A process-related concern. May include testing, release, or the like.

Comments

@tseaver
Copy link
Contributor

tseaver commented Jun 24, 2021

Name                                                                                         Stmts   Miss Branch BrPart  Cover   Missing
----------------------------------------------------------------------------------------------------------------------------------------
google/cloud/bigtable/__init__.py                                                                6      0      0      0   100%
google/cloud/bigtable/app_profile.py                                                            84      0     18      0   100%
google/cloud/bigtable/backup.py                                                                149      0     24      0   100%
google/cloud/bigtable/batcher.py                                                                33      0     10      0   100%
google/cloud/bigtable/client.py                                                                123      7     30      1    95%   209, 226-243
google/cloud/bigtable/cluster.py                                                                77      0     12      0   100%
google/cloud/bigtable/column_family.py                                                          98      0     30      0   100%
google/cloud/bigtable/encryption_info.py                                                        18      3      4      2    77%   52, 55, 64
google/cloud/bigtable/enums.py                                                                  46      0      0      0   100%
google/cloud/bigtable/error.py                                                                  16      4      2      1    72%   44, 53, 61, 64
google/cloud/bigtable/instance.py                                                              120      0     30      0   100%
google/cloud/bigtable/policy.py                                                                 60      0     18      0   100%
google/cloud/bigtable/row.py                                                                   153      0     28      0   100%
google/cloud/bigtable/row_data.py                                                              272      1     78      1    99%   493
google/cloud/bigtable/row_filters.py                                                           236      0     76      0   100%
google/cloud/bigtable/row_set.py                                                                65      0     24      0   100%
google/cloud/bigtable/table.py                                                                 278      2     76      0    99%   1128-1132
google/cloud/bigtable_admin_v2/__init__.py                                                      70      0      0      0   100%
google/cloud/bigtable_admin_v2/services/__init__.py                                              0      0      0      0   100%
google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/__init__.py                      3      0      0      0   100%
google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/async_client.py                285      0     92      0   100%
google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/client.py                      414      0    166      0   100%
google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/pagers.py                       42      0     10      0   100%
google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/__init__.py           9      0      0      0   100%
google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/base.py              93      3     12      1    96%   49, 51, 164
google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/grpc.py             151      0     54      0   100%
google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/grpc_asyncio.py     154      0     54      0   100%
google/cloud/bigtable_admin_v2/services/bigtable_table_admin/__init__.py                         3      0      0      0   100%
google/cloud/bigtable_admin_v2/services/bigtable_table_admin/async_client.py                   328      0    110      0   100%
google/cloud/bigtable_admin_v2/services/bigtable_table_admin/client.py                         470      0    190      0   100%
google/cloud/bigtable_admin_v2/services/bigtable_table_admin/pagers.py                         120      0     30      0   100%
google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/__init__.py              9      0      0      0   100%
google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/base.py                100      3     12      1    96%   50, 52, 164
google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/grpc.py                167      0     60      0   100%
google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/grpc_asyncio.py        170      0     60      0   100%
google/cloud/bigtable_admin_v2/types/__init__.py                                                 6      0      0      0   100%
google/cloud/bigtable_admin_v2/types/bigtable_instance_admin.py                                 88      0      0      0   100%
google/cloud/bigtable_admin_v2/types/bigtable_table_admin.py                                   125      0      0      0   100%
google/cloud/bigtable_admin_v2/types/common.py                                                  12      0      0      0   100%
google/cloud/bigtable_admin_v2/types/instance.py                                                43      0      0      0   100%
google/cloud/bigtable_admin_v2/types/table.py                                                   87      0      0      0   100%
google/cloud/bigtable_v2/__init__.py                                                            27      0      0      0   100%
google/cloud/bigtable_v2/services/__init__.py                                                    0      0      0      0   100%
google/cloud/bigtable_v2/services/bigtable/__init__.py                                           3      0      0      0   100%
google/cloud/bigtable_v2/services/bigtable/async_client.py                                     144      0     54      0   100%
google/cloud/bigtable_v2/services/bigtable/client.py                                           240      0    100      0   100%
google/cloud/bigtable_v2/services/bigtable/transports/__init__.py                                9      0      0      0   100%
google/cloud/bigtable_v2/services/bigtable/transports/base.py                                   59      2     12      1    96%   41, 43, 149->155
google/cloud/bigtable_v2/services/bigtable/transports/grpc.py                                   74      0     26      0   100%
google/cloud/bigtable_v2/services/bigtable/transports/grpc_asyncio.py                           77      0     26      0   100%
google/cloud/bigtable_v2/types/__init__.py                                                       3      0      0      0   100%
google/cloud/bigtable_v2/types/bigtable.py                                                      65      0      0      0   100%
google/cloud/bigtable_v2/types/data.py                                                          88      0      0      0   100%
tests/unit/__init__.py                                                                           0      0      0      0   100%
tests/unit/_testing.py                                                                          11      0      0      0   100%
tests/unit/test_app_profile.py                                                                 374      7      0      0    98%   27-28, 31-32, 39-40, 43
tests/unit/test_backup.py                                                                      535      0      4      0   100%
tests/unit/test_batcher.py                                                                     107      0      0      0   100%
tests/unit/test_client.py                                                                      322      0      2      0   100%
tests/unit/test_cluster.py                                                                     326      7      0      0    98%   28-29, 32-34, 41-42, 45
tests/unit/test_column_family.py                                                               427      0      4      0   100%
tests/unit/test_instance.py                                                                    553      0     10      0   100%
tests/unit/test_policy.py                                                                      185      0      0      0   100%
tests/unit/test_row.py                                                                         539      0      8      0   100%
tests/unit/test_row_data.py                                                                    870      8     38      0    99%   29-30, 33-35, 42-43, 46, 49
tests/unit/test_row_filters.py                                                                 751      0      4      0   100%
tests/unit/test_row_set.py                                                                     197      0      0      0   100%
tests/unit/test_table.py                                                                      1304      2     60      0    99%   2276-2278
----------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                                                                        12073     49   1658      8    99%

See also PR #174, where I worked on fixing coverage last fall.

@tseaver tseaver added the type: process A process-related concern. May include testing, release, or the like. label Jun 24, 2021
@tseaver tseaver self-assigned this Jun 24, 2021
@product-auto-label product-auto-label bot added the api: bigtable Issues related to the googleapis/python-bigtable API. label Jun 24, 2021
tseaver added a commit that referenced this issue Jun 24, 2021
tseaver added a commit that referenced this issue Jun 24, 2021
Document retryable errors as a module scope constant.

Toward #335
tseaver added a commit that referenced this issue Jun 24, 2021
tseaver added a commit that referenced this issue Jun 24, 2021
Add a test for cancellation during iteration of rows.

Toward #335
tseaver added a commit that referenced this issue Jun 24, 2021
Add a test for cancellation during iteration of rows.

Toward #335
tseaver added a commit that referenced this issue Jun 24, 2021
tseaver added a commit that referenced this issue Jun 25, 2021
tseaver added a commit that referenced this issue Jun 25, 2021
Add a test for cancellation during iteration of rows.

Toward #335
tseaver added a commit that referenced this issue Jun 25, 2021
tseaver added a commit that referenced this issue Jun 25, 2021
Also, document retryable errors as a module scope constant.

Toward #335
tseaver added a commit that referenced this issue Jun 25, 2021
…ent' (#343)

Define gRPC channel options at module-scope, improving testability, discoverability

Toward #335.
@tseaver
Copy link
Contributor Author

tseaver commented Jun 25, 2021

Yay! coverage is now at 100% for all manual code:

Name                                                                                         Stmts   Miss Branch BrPart  Cover   Missing
----------------------------------------------------------------------------------------------------------------------------------------
google/cloud/bigtable/__init__.py                                                                6      0      0      0   100%
google/cloud/bigtable/app_profile.py                                                            84      0     18      0   100%
google/cloud/bigtable/backup.py                                                                149      0     24      0   100%
google/cloud/bigtable/batcher.py                                                                33      0     10      0   100%
google/cloud/bigtable/client.py                                                                122      0     32      0   100%
google/cloud/bigtable/cluster.py                                                                77      0     12      0   100%
google/cloud/bigtable/column_family.py                                                          98      0     30      0   100%
google/cloud/bigtable/encryption_info.py                                                        18      0      4      0   100%
google/cloud/bigtable/enums.py                                                                  46      0      0      0   100%
google/cloud/bigtable/error.py                                                                  16      0      2      0   100%
google/cloud/bigtable/instance.py                                                              120      0     30      0   100%
google/cloud/bigtable/policy.py                                                                 60      0     18      0   100%
google/cloud/bigtable/row.py                                                                   153      0     28      0   100%
google/cloud/bigtable/row_data.py                                                              272      0     78      0   100%
google/cloud/bigtable/row_filters.py                                                           236      0     76      0   100%
google/cloud/bigtable/row_set.py                                                                65      0     24      0   100%
google/cloud/bigtable/table.py                                                                 279      0     78      0   100%
google/cloud/bigtable_admin_v2/__init__.py                                                      70      0      0      0   100%
google/cloud/bigtable_admin_v2/services/__init__.py                                              0      0      0      0   100%
google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/__init__.py                      3      0      0      0   100%
google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/async_client.py                285      0     92      0   100%
google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/client.py                      414      0    166      0   100%
google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/pagers.py                       42      0     10      0   100%
google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/__init__.py           9      0      0      0   100%
google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/base.py              93      4     12      1    95%   49-51, 164
google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/grpc.py             151      0     54      0   100%
google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/grpc_asyncio.py     154      0     54      0   100%
google/cloud/bigtable_admin_v2/services/bigtable_table_admin/__init__.py                         3      0      0      0   100%
google/cloud/bigtable_admin_v2/services/bigtable_table_admin/async_client.py                   328      0    110      0   100%
google/cloud/bigtable_admin_v2/services/bigtable_table_admin/client.py                         470      0    190      0   100%
google/cloud/bigtable_admin_v2/services/bigtable_table_admin/pagers.py                         120      0     30      0   100%
google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/__init__.py              9      0      0      0   100%
google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/base.py                100      4     12      1    96%   50-52, 164
google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/grpc.py                167      0     60      0   100%
google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/grpc_asyncio.py        170      0     60      0   100%
google/cloud/bigtable_admin_v2/types/__init__.py                                                 6      0      0      0   100%
google/cloud/bigtable_admin_v2/types/bigtable_instance_admin.py                                 88      0      0      0   100%
google/cloud/bigtable_admin_v2/types/bigtable_table_admin.py                                   125      0      0      0   100%
google/cloud/bigtable_admin_v2/types/common.py                                                  12      0      0      0   100%
google/cloud/bigtable_admin_v2/types/instance.py                                                43      0      0      0   100%
google/cloud/bigtable_admin_v2/types/table.py                                                   87      0      0      0   100%
google/cloud/bigtable_v2/__init__.py                                                            27      0      0      0   100%
google/cloud/bigtable_v2/services/__init__.py                                                    0      0      0      0   100%
google/cloud/bigtable_v2/services/bigtable/__init__.py                                           3      0      0      0   100%
google/cloud/bigtable_v2/services/bigtable/async_client.py                                     144      0     54      0   100%
google/cloud/bigtable_v2/services/bigtable/client.py                                           240      0    100      0   100%
google/cloud/bigtable_v2/services/bigtable/transports/__init__.py                                9      0      0      0   100%
google/cloud/bigtable_v2/services/bigtable/transports/base.py                                   59      4     12      1    93%   41-43, 155
google/cloud/bigtable_v2/services/bigtable/transports/grpc.py                                   74      0     26      0   100%
google/cloud/bigtable_v2/services/bigtable/transports/grpc_asyncio.py                           77      0     26      0   100%
google/cloud/bigtable_v2/types/__init__.py                                                       3      0      0      0   100%
google/cloud/bigtable_v2/types/bigtable.py                                                      65      0      0      0   100%
google/cloud/bigtable_v2/types/data.py                                                          88      0      0      0   100%
tests/unit/__init__.py                                                                           0      0      0      0   100%
tests/unit/_testing.py                                                                          11      0      0      0   100%
tests/unit/test_app_profile.py                                                                 361      0      0      0   100%
tests/unit/test_backup.py                                                                      536      0      4      0   100%
tests/unit/test_batcher.py                                                                     107      0      0      0   100%
tests/unit/test_client.py                                                                      400      0      8      0   100%
tests/unit/test_cluster.py                                                                     313      0      0      0   100%
tests/unit/test_column_family.py                                                               427      0      4      0   100%
tests/unit/test_encryption_info.py                                                              89      0      0      0   100%
tests/unit/test_error.py                                                                        66      0      0      0   100%
tests/unit/test_instance.py                                                                    553      0     10      0   100%
tests/unit/test_policy.py                                                                      185      0      0      0   100%
tests/unit/test_row.py                                                                         539      0      8      0   100%
tests/unit/test_row_data.py                                                                    874      0     40      0   100%
tests/unit/test_row_filters.py                                                                 751      0      4      0   100%
tests/unit/test_row_set.py                                                                     197      0      0      0   100%
tests/unit/test_table.py                                                                      1222      0     74      0   100%
----------------------------------------------------------------------------------------------------------------------------------------
TOTAL                                                                                        12203     12   1684      3    99%

@tseaver
Copy link
Contributor Author

tseaver commented Jun 25, 2021

Remaining gaps are in generated code, in corners dealing with backward-compatibility for old versions of google-auth. I pushed googleapis/gapic-generator-python#934 to try to fix that.

@tseaver
Copy link
Contributor Author

tseaver commented Jun 25, 2021

OK, by running the unit-3.6 session with the older version of google-auth, we get the coverage. So, #345 puts the requirement back to 100%.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigtable Issues related to the googleapis/python-bigtable API. type: process A process-related concern. May include testing, release, or the like.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant