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

Defend from AttributeErrors in CloudPath.__del__ (#418) #419

Merged
merged 1 commit into from Apr 1, 2024

Conversation

jayqi
Copy link
Member

@jayqi jayqi commented Apr 1, 2024

Live tests for #418

* Defend from AttributeErrors in CloudPath.__del__

If the CloudPath Client instance is incomplete, it may not have a
file_cache_mode attribute. Using getattr defensively prevents the
AttributeError from causing __del__ to exit early.

* Update HISTORY

* Fix tests by fixing a copy-paste mistake

* Use None instead of object as dummy client.

---------

Co-authored-by: Jay Qi <jayqi@users.noreply.github.com>
Copy link
Contributor

github-actions bot commented Apr 1, 2024

@github-actions github-actions bot temporarily deployed to pull request April 1, 2024 19:50 Inactive
Copy link

codecov bot commented Apr 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.7%. Comparing base (8a4198a) to head (8ce39c3).

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #419     +/-   ##
========================================
- Coverage    93.8%   93.7%   -0.2%     
========================================
  Files          23      23             
  Lines        1643    1644      +1     
========================================
- Hits         1542    1541      -1     
- Misses        101     103      +2     
Files Coverage Δ
cloudpathlib/cloudpath.py 93.5% <100.0%> (-0.4%) ⬇️

@jayqi jayqi merged commit c9da3f3 into master Apr 1, 2024
25 checks passed
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.

None yet

2 participants