def testRandomize2(self):
     #test that randomized dict still has all the same vailues
     test = {'a':[1,2,3], 'b':[4,5,6], 'c':[7,8,9]}
     rand = createItems.randomizeDict(test)
     sortedList = []
     for subList in rand.itervalues():
         sortedList += subList
     sortedList.sort()
     self.assertEqual(sortedList, [1,2,3,4,5,6,7,8,9])
Exemple #2
0
 def testRandomize2(self):
     #test that randomized dict still has all the same vailues
     test = {'a': [1, 2, 3], 'b': [4, 5, 6], 'c': [7, 8, 9]}
     rand = createItems.randomizeDict(test)
     sortedList = []
     for subList in rand.itervalues():
         sortedList += subList
     sortedList.sort()
     self.assertEqual(sortedList, [1, 2, 3, 4, 5, 6, 7, 8, 9])
 def testRandomize1(self):
     #test that values change order after randomizing
     test = {'a':[1,2,3], 'b':[4,5,6], 'c':[7,8,9]}
     rand = createItems.randomizeDict(test)
     self.assertNotEqual(test['a'], rand['a'])
Exemple #4
0
 def testRandomize1(self):
     #test that values change order after randomizing
     test = {'a': [1, 2, 3], 'b': [4, 5, 6], 'c': [7, 8, 9]}
     rand = createItems.randomizeDict(test)
     self.assertNotEqual(test['a'], rand['a'])