Simplified printing in tm_test.py