Skip to content

Commit

Permalink
tests: assert_queries_count behaviour changed
Browse files Browse the repository at this point in the history
it now returns function result when everything is ok
  • Loading branch information
jqb committed Oct 5, 2013
1 parent a7fbfc9 commit 77f39e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ def assert_queries_count(self, num, func=None, *args, **kwargs):

context = _AssertNumQueriesContext(self, num, conn)
if func is None:
return context
return None

with context:
func(*args, **kwargs)
return func(*args, **kwargs)


class TestCase(unittest.TestCase):
Expand Down

0 comments on commit 77f39e3

Please sign in to comment.