fix python 2.5 regression in test_tool