diff options
Diffstat (limited to 'libpathod/test.py')
-rw-r--r-- | libpathod/test.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libpathod/test.py b/libpathod/test.py index 53daa5bf..e431be18 100644 --- a/libpathod/test.py +++ b/libpathod/test.py @@ -12,6 +12,13 @@ class Daemon: self.port = self.q.get(True, 5) self.urlbase = "%s://%s:%s"%("https" if ssl else "http", self.IFACE, self.port) + def __enter__(self): + return self + + def __exit__(self, type, value, traceback): + self.shutdown() + return False + def p(self, spec): """ Return a URL that will render the response in spec. |