Lines Matching refs:fromkeys
440 self.assertEqual(self.type2test.fromkeys('abc'), {'a':None, 'b':None, 'c':None})
442 self.assertTrue(not(d.fromkeys('abc') is d))
443 self.assertEqual(d.fromkeys('abc'), {'a':None, 'b':None, 'c':None})
444 self.assertEqual(d.fromkeys((4,5),0), {4:0, 5:0})
445 self.assertEqual(d.fromkeys([]), {})
448 self.assertEqual(d.fromkeys(g()), {1:None})
449 self.assertRaises(TypeError, {}.fromkeys, 3)
451 self.assertEqual(dictlike.fromkeys('a'), {'a':None})
452 self.assertEqual(dictlike().fromkeys('a'), {'a':None})
453 self.assertTrue(dictlike.fromkeys('a').__class__ is dictlike)
454 self.assertTrue(dictlike().fromkeys('a').__class__ is dictlike)
456 # self.assertTrue(type(dictlike.fromkeys('a')) is dictlike)
460 ud = mydict.fromkeys('ab')
464 self.assertRaises(TypeError, dict.fromkeys)
472 fromkeys, [1])
480 self.assertRaises(Exc, self.type2test.fromkeys, BadSeq())
486 self.assertRaises(Exc, baddict2.fromkeys, [1])
596 ud = mydict.fromkeys('ab')