setup.py: Simplify test function
Drop Python 2 support in tests