airbrake-python icon indicating copy to clipboard operation
airbrake-python copied to clipboard

Tests to prevent shipping same exception instance twice

Open zachgoldstein opened this issue 8 years ago • 0 comments

So I see the notes about the global exception stack here: https://github.com/airbrake/airbrake-python/blob/master/airbrake/notifier.py#L153

And later I see duplicate exception instances getting filtered out. https://github.com/airbrake/airbrake-python/blob/master/airbrake/notifier.py#L173:

# dont ship the same exception instance twice
if exc_info[1] in self._exc_queue:
    exc_info = None, None, None
self._exc_queue.put(exc_info[1])

But I can't see any tests around this to make sure. This is probably not trivial, but it'd be nice to see the case where this is needed.

zachgoldstein avatar Feb 09 '17 02:02 zachgoldstein