Index: .tests/test1.py
===================================================================
--- .tests/test1.py	(revision 23fd63d7e06b7cf33f4206a7a5758109cbf69254)
+++ .tests/test1.py	(revision a4623f4ab692f766b67d2d108224d358ba0b0e20)
@@ -4,11 +4,15 @@
 import select
 
+YESTEST = True
 MESSAGETEST = True
-BLOCKTEST = False
+BLOCKTEST = True
 OFFLINETEST = False
 RENAMETEST = True
-BURPTEST = True
+SHOWLOG = True
 
-FAILED = False
+FAILED = []
+
+SEPARATOR = "================================"
+SMOLPARATOR = "--------------------------------"
 
 class IrcClient:
@@ -83,8 +87,71 @@
         self.send_priv_msg("&bitlbee", "rename " + oldnick + " " + newnick)
         
-def test_send_message(sender, receiver, message):
+def msg_comes_thru(sender, receiver, message):
     sender.send_priv_msg(receiver.nick, message)
     received = receiver.receive().find(message) != -1
-    return received;
+    return received
+
+def perform_test(clis, test_function, test_name):
+    global FAILED
+    for cli in clis:
+        cli.tmplog=""
+
+    print("\n"+SEPARATOR)
+    print("Test: "+test_name)
+
+    if test_function(clis):
+        print("Test passed")
+    else:
+        print("Test failed")
+        FAILED += [test_name]
+
+        flag = False
+        for cli in clis:
+            if cli.tmplog != "":
+                print(SMOLPARATOR)
+                print("Test Log "+ cli.nick+":")
+                print(cli.tmplog)
+                flag = True
+        if flag:
+            print(SMOLPARATOR)
+
+    print(SEPARATOR+"\n")
+
+def yes_test(clis):
+    ret = False
+    for _ in range(100):
+        clis[0].send_raw("yes", loud = False)
+        clis[0].receive()
+        if (not ret) and clis[0].log.find("Did I ask you something?"):
+            ret = True
+        if clis[0].log.find("Buuuuuuuuuuuuuuuurp"):
+            print("The RNG gods smile upon us")
+            break
+    return ret
+
+def message_test(clis):
+    print("Test: Send message")
+    ret = msg_comes_thru(clis[0], clis[1], 'ohai <3')
+    ret = ret & msg_comes_thru(clis[1], clis[0], 'uwu *pounces*')
+    return ret
+
+def block_test(clis):
+    clis[0].block_jabber_buddy(clis[1].nick)
+    ret = not msg_comes_thru(clis[1], clis[0], 'm-meow?')
+    clis[0].unblock_jabber_buddy(clis[1].nick)
+    ret = ret & msg_comes_thru(clis[1], clis[0], '*purrs*')
+    return ret
+
+def rename_test(clis):
+    newname = "xXx_pup_LINKENPARK4EVA"
+    message = "rawr meanmz i luv<3 u in dinosaur"
+
+    clis[0].rename_jabber_buddy(clis[1].nick, newname)
+    clis[0].send_priv_msg(newname, message)
+    ret = clis[1].receive().find(message) != -1
+
+    clis[0].rename_jabber_buddy("-del", newname)
+    ret = ret & msg_comes_thru(clis[0], clis[1], "rawr")
+    return ret
 
 def run_tests():
@@ -96,19 +163,6 @@
         cli.connect()
 
-    if BURPTEST:
-        print("Test: Yes")
-        ret = False
-        for _ in range(100):
-            clis[0].send_raw("yes")
-            clis[0].receive()
-            if (not ret) and clis[0].log.find("Did I ask you something?"):
-                ret = True
-            if clis[0].log.find("Buuuuuuuuuuuuuuuurp"):
-                print("The RNG gods smile upon us")
-                break
-        if ret:
-            print("Test passed")
-        else:
-            print("Test failed")
+    if YESTEST:
+        perform_test(clis, yes_test, "Yes")
 
     for cli in clis:
@@ -117,46 +171,26 @@
 
     if MESSAGETEST:
-        print("Test: Send message")
-        ret = test_send_message(clis[0], clis[1], 'ohai <3')
-        ret = ret & test_send_message(clis[1], clis[0], 'uwu *pounces*')
-        if ret:
-            print("Test passed")
-        else:
-            print("Test failed")
-            FAILED = True;
-            
+        perform_test(clis, message_test, "Send message")
 
     if BLOCKTEST:
-        print("Test: Block/Unblock")
-        clis[0].block_jabber_buddy(clis[1].nick)
-        ret = not test_send_message(clis[1], clis[0], 'm-meow?')
-        clis[0].unblock_jabber_buddy(clis[1].nick)
-        ret = ret & test_send_message(clis[1], clis[0], '*purrs*')
-        if ret:
-            print("Test passed")
-        else:
-            print("Test failed")
-            FAILED = True;
+        perform_test(clis, block_test, "Block user")
 
     if RENAMETEST:
-        print("Test: Rename buddy")
-        newname = "xXx_pup_LINKENPARK4EVA"
-        message = "rawr meanmz i luv<3 u in dinosaur"
+        perform_test(clis, rename_test, "Rename user")
 
-        clis[0].rename_jabber_buddy(clis[1].nick, newname)
-        clis[0].send_priv_msg(newname, message)
-        ret = clis[1].receive().find(message) != -1
+    if FAILED or SHOWLOG:
+        print("")
+        for cli in clis:
+            print(SMOLPARATOR)
+            print("Log "+ cli.nick+":")
+            print(cli.log)
+        print(SMOLPARATOR)
 
-        clis[0].rename_jabber_buddy("-del", newname)
-        ret = ret & test_send_message(clis[0], clis[1], "rawr")
-        if ret:
-            print("Test passed")
-        else:
-            print("Test failed")
-            FAILED = True;
-
-    if FAILED:
-        print("\ntest1 Log:\n"+clis[0].log)
-        print("\ntest2 Log:\n"+clis[1].log)
+    if len(FAILED) != 0:
+        print("\n" + SEPARATOR + "\nSome test have failed:")
+        for fail in FAILED:
+            print(fail)
+    else:
+        print("\n" + SEPARATOR + "\nAll tests have passed")
     
 if __name__ == "__main__":
