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

[Robust Testing] Move tests to tests/unit/context #9966

Merged
merged 3 commits into from
Apr 18, 2024

Conversation

MichelleArk
Copy link
Contributor

@MichelleArk MichelleArk commented Apr 17, 2024

addresses: #9961

Problem

Our unit tests are currently in files that don’t match the modules they are testing and are in a flat directory structure.

Solution

Tackle three unit test files and move them:

  • test_providers.py to tests/unit/context
  • test_query_header.py to tests/unit/context
    • also moved QueryHeaderContext into its own context
  • move test_context.py to tests/unit/context

also: lots of unittest.TestCase deprecation!

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX
  • This PR includes type annotations for new and modified functions

@MichelleArk MichelleArk requested a review from a team as a code owner April 17, 2024 20:08
@cla-bot cla-bot bot added the cla:yes label Apr 17, 2024
Copy link
Contributor

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

@MichelleArk MichelleArk added the Skip Changelog Skips GHA to check for changelog file label Apr 17, 2024
@MichelleArk MichelleArk requested a review from QMalcolm April 17, 2024 20:12
Copy link

codecov bot commented Apr 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.15%. Comparing base (668fe78) to head (27aec66).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9966      +/-   ##
==========================================
+ Coverage   80.53%   88.15%   +7.61%     
==========================================
  Files         180      181       +1     
  Lines       22578    22581       +3     
==========================================
+ Hits        18184    19907    +1723     
+ Misses       4394     2674    -1720     
Flag Coverage Δ
integration 85.47% <100.00%> (+4.93%) ⬆️
unit 62.09% <100.00%> (?)

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
Contributor

@QMalcolm QMalcolm left a comment

Choose a reason for hiding this comment

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

Thank you! 🙂

@MichelleArk MichelleArk merged commit f5f9591 into main Apr 18, 2024
70 of 72 checks passed
@MichelleArk MichelleArk deleted the arky/reorganize-tests branch April 18, 2024 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:yes Skip Changelog Skips GHA to check for changelog file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants