Skip to content
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 bugsnag/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def __call__(self, function):
@wraps(function)
def decorate(*args, **kwargs):
with self:
function(*args, **kwargs)
return function(*args, **kwargs)

return decorate

Expand Down
8 changes: 8 additions & 0 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@ def foo():

self.assertSentReportCount(1)

def test_capture_decorator_returns_value(self):

@self.client.capture
def foo():
return "300"

self.assertEqual(foo(), "300")

def test_capture_decorator_raises(self):

@self.client.capture
Expand Down