--- a/pyke/krb_traceback.py
+++ b/pyke/krb_traceback.py
@@ -129,3 +129,10 @@
                 pathname = pathname[sep_index + 1:]
         if info: batch.append(info)
     return ans + batch
+
+def test():
+    import doctest
+    sys.exit(doctest.testmod()[0])
+
+if __name__ == "__main__":
+    test()