testing of multithreading in python