Skip to content

Conversation

@matthewfeickert
Copy link
Member

@matthewfeickert matthewfeickert commented Feb 19, 2022

Description

Resolves #1776

  • Use context managers to avoid warnings from files not being closed properly.
  • Remove filterwarnings for 'pytest.PytestUnraisableExceptionWarning:Exception ignored in: <_io.FileIO [closed]>' warnings
  • Rename context manager variables from PR fix: Specify encoding as utf-8 to enforce PEP 597 #2007 to be more informative

Checklist Before Requesting Reviewer

  • Tests are passing
  • "WIP" removed from the title of the pull request
  • Selected an Assignee for the PR to be responsible for the log summary

Before Merging

For the PR Assignees:

  • Summarize commit messages into a comprehensive review of the PR
* Use context managers to avoid warnings from files not being closed properly.
* Remove filterwarnings for 'pytest.PytestUnraisableExceptionWarning:Exception
ignored in: <_io.FileIO [closed]>' warnings.
* Use context managers in docs and notebooks to promote best practices.
* Rename context manager variables from PR #2007 to be more informative.
   - Amends PR #2007

@matthewfeickert matthewfeickert added docs Documentation related tests pytest labels Feb 19, 2022
@matthewfeickert matthewfeickert self-assigned this Feb 19, 2022
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@matthewfeickert matthewfeickert added the chore Other changes that don't modify src or test files label Feb 19, 2022
@matthewfeickert matthewfeickert marked this pull request as draft February 19, 2022 07:49
@matthewfeickert matthewfeickert force-pushed the test/use-context-manager branch 2 times, most recently from 8b3f952 to bcebcc0 Compare September 15, 2022 04:30
@matthewfeickert
Copy link
Member Author

Additional context managers still needed in tests/test_scripts.py.

@matthewfeickert matthewfeickert changed the base branch from master to main September 21, 2022 20:52
@matthewfeickert matthewfeickert force-pushed the test/use-context-manager branch from 2c3ddb9 to 058ce0e Compare December 4, 2022 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Other changes that don't modify src or test files docs Documentation related tests pytest

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

Use context managers in tests to avoid pytest.PytestUnraisableExceptionWarning:Exception ignored in: <_io.FileIO [closed]>

2 participants