Small modifications to misc/test.py