tests: fix TEST= filtering for python3