Upgrade test.py