fixed tests.py, added timeout