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

[python] Normalize unit-test exception coverage #1909

Merged
merged 1 commit into from
Nov 14, 2023
Merged

Conversation

johnkerl
Copy link
Member

@johnkerl johnkerl commented Nov 14, 2023

As we run our unit tests on more and more environments, including on-image from docker run, we more often run into an old unit-test error. Namely, apis/python/tests/test_dataframe_index_columns.py::test_types_read_errors may either throw RuntimeError or tiledb.cc.TileDBError. Yet we only catch the former. This means, for example, when running unit tests from docker run we need to mentally 'subtract out' these spurious fails. (This has already bitten developers, who have become used to it.) What we should be doing is catching both. (Also note: grepping for RuntimeError in apis/python/tests show we already do this in other unit-test files -- we need to do it in one more.)

@codecov-commenter
Copy link

codecov-commenter commented Nov 14, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (af10674) 62.75% compared to head (fdc05ed) 89.61%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1909       +/-   ##
===========================================
+ Coverage   62.75%   89.61%   +26.86%     
===========================================
  Files         106       34       -72     
  Lines       10014     3592     -6422     
===========================================
- Hits         6284     3219     -3065     
+ Misses       3730      373     -3357     
Flag Coverage Δ
python 89.61% <ø> (+0.68%) ⬆️
r ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@nguyenv nguyenv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potentially corrected here and here in #1793 where we translate RuntimeError to SOMAError. Approving this PR in the interim before #1793 gets merged.

@johnkerl johnkerl merged commit 75d1a91 into main Nov 14, 2023
10 checks passed
@johnkerl johnkerl deleted the kerl/unit-test-catch branch November 14, 2023 19:55
johnkerl added a commit that referenced this pull request Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants