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

unittest: Always use "raise" with an argument. #937

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion python-stdlib/unittest/manifest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
metadata(version="0.10.3")
metadata(version="0.10.4")

package("unittest")
4 changes: 2 additions & 2 deletions python-stdlib/unittest/unittest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def assertRaises(self, exc, func=None, *args, **kwargs):
except Exception as e:
if isinstance(e, exc):
return
raise
raise e

assert False, "%r not raised" % exc

Expand Down Expand Up @@ -407,7 +407,7 @@ def run_one(test_function):
current_test=(name, c), test_result=test_result, exc_info=(type(ex), ex, None)
)
# Uncomment to investigate failure in detail
# raise
# raise ex
finally:
__test_result__ = None
__current_test__ = None
Expand Down
Loading