Skip to content

Commit 31c8886

Browse files
committed
fix
1 parent 47ef906 commit 31c8886

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

tests/test_basics.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -728,18 +728,15 @@ def before_send(event, hint):
728728
sentry_init(before_send=before_send)
729729
events = capture_events()
730730

731+
exc = ValueError("aha!")
731732
for _ in range(2):
732733
# The first ValueError will be dropped by before_send. The second
733734
# ValueError will be accepted by before_send, and should be sent to
734735
# Sentry.
735736
try:
736-
raise ValueError("aha!")
737+
raise exc
737738
except Exception:
738-
try:
739-
capture_exception()
740-
reraise(*sys.exc_info())
741-
except Exception:
742-
capture_exception()
739+
capture_exception()
743740

744741
assert len(events) == 1
745742

0 commit comments

Comments
 (0)