Skip to content
Snippets Groups Projects
Commit 57b14988 authored by Christophe Simonis's avatar Christophe Simonis
Browse files

[FIX] core: close cursors open during tests

parent 731b9f60
No related branches found
No related tags found
No related merge requests found
......@@ -88,7 +88,14 @@ class BaseCase(unittest2.TestCase):
"""
def cursor(self):
return self.registry.cursor()
cr = self.registry.cursor()
@self.addCleanup
def close_cursor():
if not cr.closed:
cr.close()
return cr
def ref(self, xid):
""" Returns database ID for the provided :term:`external identifier`,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment