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

[Test] Use context manager for auto tmp dirs cleanup #2922

Merged

Conversation

JiangJiaWei1103
Copy link
Contributor

Why are the changes needed?

Remove temporary directories after the unit test is passed in a neat way.

What changes were proposed in this pull request?

Use context manager to support automatic temporary directory cleanup on the completion of the context. The test result is shown as follows:

Screenshot 2024-11-12 at 8 20 06 PM

How was this patch tested?

Pass unit test locally.

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

flyteorg/flytekit#2881 & flyteorg/flytekit#2917

Docs link

Copy link

codecov bot commented Nov 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.83%. Comparing base (3f0ab84) to head (26cbca7).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2922      +/-   ##
==========================================
- Coverage   76.33%   74.83%   -1.51%     
==========================================
  Files         199      264      +65     
  Lines       20840    23455    +2615     
  Branches     2681     2680       -1     
==========================================
+ Hits        15908    17552    +1644     
- Misses       4214     5171     +957     
- Partials      718      732      +14     

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

@Future-Outlier Future-Outlier merged commit a6d6335 into flyteorg:master Nov 12, 2024
105 of 106 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants