def _check_to_native(self, in_string, encoding, py2_expected, py3_expected):
 if PY3:
  self.assertEqual(to_native(in_string, encoding), py3_expected)
 else:
  self.assertEqual(to_native(in_string, encoding), py2_expected)

def _check_to_native ( self , in_string , encoding , py2_expected , py3_expected ) : if PY3 : self . assertEqual ( to_native ( in_string , encoding ) , py3_expected ) else : self . assertEqual ( to_native ( in_string , encoding ) , py2_expected )
test happy path of encoding to native strings .