32# test the testing framework, namely _str from common_imports 33self.assertEqual(_str('\x10'),_str('\u0010')) 34self.assertEqual(_str('\x10'),_str('\U00000010')) 35self.assertEqual(_str('\u1234'),_str('\U00001234'))
116117self.assertRaises(ValueError,settext,_str('ab\ufffe'))118self.assertRaises(ValueError,settext,_str('ö\ffff'))119self.assertRaises(ValueError,settext,_str('\u0123\ud800'))120self.assertRaises(ValueError,settext,_str('x\ud8ff'))121self.assertRaises(ValueError,settext,_str('\U00010000\udfff'))122self.assertRaises(ValueError,settext,_str('abd\x00def'))123# should not Raise124settext(_str('\ud7ff\ue000\U00010000\U0010FFFFäöas'))125126forchar_valinrange(0xD800,0xDFFF+1):127self.assertRaises(ValueError,settext,'abc'+_chr(char_val))128self.assertRaises(ValueError,settext,_chr(char_val))129self.assertRaises(ValueError,settext,_chr(char_val)+'abc')130131self.assertRaises(ValueError,settext,_bytes('\xe4'))132self.assertRaises(ValueError,settext,_bytes('\x80'))133self.assertRaises(ValueError,settext,_bytes('\xff'))134self.assertRaises(ValueError,settext,_bytes('\x08'))135self.assertRaises(ValueError,settext,_bytes('\x19'))136self.assertRaises(ValueError,settext,_bytes('\x20\x00'))137# should not Raise138settext(_bytes('\x09\x0A\x0D\x20\x60\x7f'))
144145self.assertRaises(ValueError,el,':')146self.assertRaises(ValueError,el,'0a')147self.assertRaises(ValueError,el,_str('\u203f'))148# should not Raise149el(_str('\u0132'))150151152