encode string to bytes for py3
don't use unittest.skipUnless