Fix test_types.py logic.