diff options
Diffstat (limited to 'libpathod/test.py')
-rw-r--r-- | libpathod/test.py | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/libpathod/test.py b/libpathod/test.py index 23b399d9..53cbd8d5 100644 --- a/libpathod/test.py +++ b/libpathod/test.py @@ -4,19 +4,6 @@ import pathod IFACE = "127.0.0.1" -class PaThread(threading.Thread): - def __init__(self, q, app): - threading.Thread.__init__(self) - self.q = q - self.app = app - self.port = None - - def run(self): - self.server, self.port = pathod.make_server(self.app, 0, IFACE, None) - self.q.put(self.port) - pathod.run(self.server) - - class Daemon: def __init__(self, staticdir=None, anchors=()): self.app = pathod.make_app(staticdir=staticdir, anchors=anchors) @@ -33,3 +20,17 @@ class Daemon: def shutdown(self): requests.post("%s/api/shutdown"%self.urlbase) + + +class PaThread(threading.Thread): + def __init__(self, q, app): + threading.Thread.__init__(self) + self.q = q + self.app = app + self.port = None + +# begin nocover + def run(self): + self.server, self.port = pathod.make_server(self.app, 0, IFACE, None) + self.q.put(self.port) + pathod.run(self.server) |