Пример #1
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])
Пример #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])
Пример #3
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'])
Пример #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'])