-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Closed
Closed
Copy link
Labels
3.12only security fixesonly security fixes3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixes
Description
class PurePythonExceptionFormattingMixin:
def get_exception(self, callable, slice_start=0, slice_end=-1):
try:
callable()
self.fail("No exception thrown.")
except:
return traceback.format_exc().splitlines()[slice_start:slice_end]
self.fail
simply raises an exception, so putting it in a try..except is not going to work.
Linked PRs
- gh-125514: fix bug in test_traceback utility. Specify exception types in except: clauses #125516
- [3.13] gh-125514: fix bug in test_traceback utility. Specify exception types in except: clauses (GH-125516) #125524
- [3.12] gh-125514: fix bug in test_traceback utility. Specify exception types in except: clauses (GH-125516) #125525
AlexWaygood, nineteendo, pablogsal and efimov-mikhailhroncok
Metadata
Metadata
Assignees
Labels
3.12only security fixesonly security fixes3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixes