Lines Matching refs:fromkeys
441 self.assertEqual(self.type2test.fromkeys('abc'), {'a':None, 'b':None, 'c':None})
443 self.assertTrue(not(d.fromkeys('abc') is d))
444 self.assertEqual(d.fromkeys('abc'), {'a':None, 'b':None, 'c':None})
445 self.assertEqual(d.fromkeys((4,5),0), {4:0, 5:0})
446 self.assertEqual(d.fromkeys([]), {})
449 self.assertEqual(d.fromkeys(g()), {1:None})
450 self.assertRaises(TypeError, {}.fromkeys, 3)
452 self.assertEqual(dictlike.fromkeys('a'), {'a':None})
453 self.assertEqual(dictlike().fromkeys('a'), {'a':None})
454 self.assertTrue(dictlike.fromkeys('a').__class__ is dictlike)
455 self.assertTrue(dictlike().fromkeys('a').__class__ is dictlike)
461 ud = mydict.fromkeys('ab')
465 self.assertRaises(TypeError, dict.fromkeys)
473 self.assertRaises(Exc, baddict1.fromkeys, [1])
481 self.assertRaises(Exc, self.type2test.fromkeys, BadSeq())
487 self.assertRaises(Exc, baddict2.fromkeys, [1])
597 ud = mydict.fromkeys('ab')