diff --git a/beanstalkc.py b/beanstalkc.py
index <HASH>..<HASH> 100644
--- a/beanstalkc.py
+++ b/beanstalkc.py
@@ -125,11 +125,16 @@ class Job:
             self.conn.delete(self.jid)
             self.reserved = False
 
+    def stats(self):
+        return self.conn.stats_job(self.jid)
+
 
 if __name__ == '__main__':
     import doctest, time, os
-    pid = os.spawnlp(os.P_NOWAIT,
-                     'beanstalkd',
-                     'beanstalkd', '-l', '127.0.0.1', '-p', '14711')
-    doctest.testfile('TUTORIAL')
-    os.kill(pid, 9)
+    try:
+        pid = os.spawnlp(os.P_NOWAIT,
+                         'beanstalkd',
+                         'beanstalkd', '-l', '127.0.0.1', '-p', '14711')
+        doctest.testfile('TUTORIAL')
+    finally:
+        os.kill(pid, 9)
Always kill the embedded beandstalkd used for doctesting