def testWrongStringType(self):
        value = 1
        with self.assertRaises(TypeError):
            WXFExprString(value)

        value = [1, 2, 3]
        with self.assertRaises(TypeError):
            WXFExprString(value)

        value = {1: "foo"}
        with self.assertRaises(TypeError):
            WXFExprString(value)

        value = bytearray([1, 2, 3])
        with self.assertRaises(TypeError):
            WXFExprString(value)
 def testBasicString(self):
     value = "maître & élève"
     wxfexpr = WXFExprString(value)
     self.assertEqual(wxfexpr.value, value.encode(encoding="utf-8"))