reformat tests.py