Skip to content

Conversation

effigies
Copy link
Member

Bug introduced in #1172 that is breaking tests now that we raise an ExpiredDeprecationError inside an InTemporaryDirectory. If a context manager doesn't catch exceptions raised in yield and do cleanup in a finally: block, the cleanup may not get done. Here, it caused our CWD to be a deleted directory, breaking the next use of InTemporaryDirectory.

@codecov
Copy link

codecov bot commented Jan 13, 2023

Codecov Report

Base: 92.39% // Head: 92.12% // Decreases project coverage by -0.26% ⚠️

Coverage data is based on head (bb374f1) compared to base (323a88a).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@               Coverage Diff               @@
##           maint/5.0.x    #1184      +/-   ##
===============================================
- Coverage        92.39%   92.12%   -0.27%     
===============================================
  Files               97       97              
  Lines            12284    12285       +1     
  Branches          2526     2526              
===============================================
- Hits             11350    11318      -32     
- Misses             612      650      +38     
+ Partials           322      317       -5     
Impacted Files Coverage Δ
nibabel/tmpdirs.py 100.00% <100.00%> (ø)
nibabel/loadsave.py 71.30% <0.00%> (-21.74%) ⬇️
nibabel/dataobj_images.py 85.48% <0.00%> (-9.68%) ⬇️
nibabel/pkg_info.py 66.66% <0.00%> (-3.71%) ⬇️
nibabel/orientations.py 99.15% <0.00%> (-0.85%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@effigies effigies merged commit b9c5451 into nipy:maint/5.0.x Jan 13, 2023
@effigies effigies deleted the fix/tmpdir_finally branch January 13, 2023 16:07
@effigies effigies added this to the 5.0.1 milestone Mar 29, 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.

1 participant