Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Ensure own exception
  • Loading branch information
ambv authored Sep 10, 2021
commit b6d9e3e7a09250697987288adb3fff1265f5015d
5 changes: 3 additions & 2 deletions Lib/test/test_contextlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -1117,8 +1117,9 @@ def test_exception(self):
try:
with chdir(target):
assert os.getcwd() == target
raise RuntimeError()
except RuntimeError:
raise RuntimeError("boom")
except RuntimeError as re:
assert str(re) == "boom"
pass
assert os.getcwd() == old_cwd

Expand Down