def test_loadEventList(self):
        lst = []
        lst.append("a")
        lst.append("b")
        lst.append("c")
        kp = KeyPlayer("")
        kp.loadEventList(lst)

        self.assertEqual(len(kp.eventQueue), 3)
        self.assertEqual(kp.eventQueue.pop(), "c")
        self.assertEqual(kp.eventQueue.pop(), "b")
        self.assertEqual(kp.eventQueue.pop(), "a")
    def play(self, keyList, clickList):
        kp = KeyPlayer()
        kp.loadEventList(keyList)

        cp = ClickPlayer()
        cp.loadEventList(clickList)

        try:
            t1 = threading.Thread(target=kp.play)
            t2 = threading.Thread(target=cp.play)
            t1.start()
            t2.start()

            t1.join()
            t2.join()
        #    print "starting thread!"
        #kp.play()
            #thread.start_new_thread( kp.play, ())
        except:
            print "Error: unable to start KeyPlayer thread."