Lines Matching refs:fromkeys
424 self.assertEqual(self.type2test.fromkeys('abc'), {'a':None, 'b':None, 'c':None})
426 self.assertTrue(not(d.fromkeys('abc') is d))
427 self.assertEqual(d.fromkeys('abc'), {'a':None, 'b':None, 'c':None})
428 self.assertEqual(d.fromkeys((4,5),0), {4:0, 5:0})
429 self.assertEqual(d.fromkeys([]), {})
432 self.assertEqual(d.fromkeys(g()), {1:None})
433 self.assertRaises(TypeError, {}.fromkeys, 3)
435 self.assertEqual(dictlike.fromkeys('a'), {'a':None})
436 self.assertEqual(dictlike().fromkeys('a'), {'a':None})
437 self.assertTrue(dictlike.fromkeys('a').__class__ is dictlike)
438 self.assertTrue(dictlike().fromkeys('a').__class__ is dictlike)
439 self.assertTrue(type(dictlike.fromkeys('a')) is dictlike)
443 ud = mydict.fromkeys('ab')
446 self.assertRaises(TypeError, dict.fromkeys)
454 self.assertRaises(Exc, baddict1.fromkeys, [1])
462 self.assertRaises(Exc, self.type2test.fromkeys, BadSeq())
468 self.assertRaises(Exc, baddict2.fromkeys, [1])
571 ud = mydict.fromkeys('ab')