Lines Matching full:eval

36         self.assertRaises(SyntaxError, eval, 'lambda a,a:0')
37 self.assertRaises(SyntaxError, eval, 'lambda a,a=1:0')
38 self.assertRaises(SyntaxError, eval, 'lambda a=1,a=1:0')
120 "Test mapping interface versus possible calls from eval()."
230 self.assertRaises(SyntaxError, eval, "2e")
231 self.assertRaises(SyntaxError, eval, "2.0e+")
232 self.assertRaises(SyntaxError, eval, "1e-")
233 self.assertRaises(SyntaxError, eval, "3-4e/21")
258 self.assertRaises(SyntaxError, eval, arg)
260 self.assertEqual(eval("0777"), 511)
261 self.assertEqual(eval("0777L"), 511)
262 self.assertEqual(eval("000777"), 511)
263 self.assertEqual(eval("0xff"), 255)
264 self.assertEqual(eval("0xffL"), 255)
265 self.assertEqual(eval("0XfF"), 255)
266 self.assertEqual(eval("0777."), 777)
267 self.assertEqual(eval("0777.0"), 777)
268 self.assertEqual(eval("000000000000000000000000000000000000000000000000000777e0"), 777)
269 self.assertEqual(eval("0777e1"), 7770)
270 self.assertEqual(eval("0e0"), 0)
271 self.assertEqual(eval("0000E-012"), 0)
272 self.assertEqual(eval("09.5"), 9.5)
273 self.assertEqual(eval("0777j"), 777j)
274 self.assertEqual(eval("00j"), 0j)
275 self.assertEqual(eval("00.0"), 0)
276 self.assertEqual(eval("0e3"), 0)
277 self.assertEqual(eval("090000000000000."), 90000000000000.)
278 self.assertEqual(eval("090000000000000.0000000000000000000000"), 90000000000000.)
279 self.assertEqual(eval("090000000000000e0"), 90000000000000.)
280 self.assertEqual(eval("090000000000000e-0"), 90000000000000.)
281 self.assertEqual(eval("090000000000000j"), 90000000000000j)
282 self.assertEqual(eval("000000000000007"), 7)
283 self.assertEqual(eval("000000000000008."), 8.)
284 self.assertEqual(eval("000000000000009."), 9.)
285 self.assertEqual(eval("0b101010"), 42)
286 self.assertEqual(eval("-0b000000000010"), -2)
287 self.assertEqual(eval("0o777"), 511)
288 self.assertEqual(eval("-0o0000010"), -8)
289 self.assertEqual(eval("020000000000.0"), 20000000000.0)
290 self.assertEqual(eval("037777777777e0"), 37777777777.0)
291 self.assertEqual(eval("01000000000000000000000.0"),
299 self.assertEqual(eval(all_one_bits), 4294967295L)
300 self.assertEqual(eval("-" + all_one_bits), -4294967295L)
304 self.assertEqual(eval(all_one_bits), 18446744073709551615L)
305 self.assertEqual(eval("-" + all_one_bits), -18446744073709551615L)
310 self.assertIsInstance(eval("%s" % (-sys.maxint - 1)), int)
311 self.assertIsInstance(eval("%s" % (-sys.maxint - 2)), long)
425 self.assertEqual(eval(code), u'\xc2\xa4')
427 self.assertEqual(eval(code), u'\xc2\xa4')
429 self.assertEqual(eval(code), u'\xc2\xa4')
431 self.assertEqual(eval(code), u'\xa4')
433 self.assertEqual(eval(code), test_support.u(r'\xc2\u20ac'))
435 self.assertEqual(eval(code), u'# -*- coding: utf-8 -*-\n\xc2\xa4')
551 self.assertRaises(TypeError, compile, co1, '<ast>', 'eval')
578 compile(u"123\x00", "<dummy>", "eval")
581 compile(buffer("123\x00"), "<dummy>", "eval")
582 code = compile(buffer("123\x00", 1, 2), "<dummy>", "eval")
583 self.assertEqual(eval(code), 23)
584 code = compile(buffer("1234", 1, 2), "<dummy>", "eval")
585 self.assertEqual(eval(code), 23)
586 code = compile(buffer("$23$", 1, 2), "<dummy>", "eval")
587 self.assertEqual(eval(code), 23)