mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-09-17 14:04:11 +02:00
Test for with db.tracer() contextmanager
This commit is contained in:
parent
a021b6b62e
commit
31bea2ac61
2 changed files with 29 additions and 1 deletions
|
|
@ -130,7 +130,7 @@ class Database:
|
|||
|
||||
@contextlib.contextmanager
|
||||
def tracer(self, tracer=None):
|
||||
prev_tracer = self.tracer
|
||||
prev_tracer = self._tracer
|
||||
self._tracer = tracer or print
|
||||
try:
|
||||
yield self
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue