Skip to content

Commit

Permalink
add link to python docs for cwd context manager
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisvang committed Oct 4, 2023
1 parent 6d2c707 commit 1e04d0f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ def _create_cwd_change_generator():
TemporaryDirectory can also be used without context management, as it is
cleaned up automatically. Nevertheless, it is neater to use an explicit
context manager here.
Also see example in docs:
https://docs.python.org/3/library/contextlib.html#contextlib.contextmanager
"""
# based on the pytest cleandir trick
original_cwd = os.getcwd()
Expand Down

0 comments on commit 1e04d0f

Please sign in to comment.