Improve several tests
Explicit literal types and tests for py2 vs py3