[test] Remove Python 2/3 compatibility See merge request !2000 (cherry picked from commit 96267523) 4517ddb2 [test] Remove Python 2/3 compatibility