Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

import unittest 

from pfs.datamodel.utils import createHash 

 

 

class CreateHashTestCase(unittest.TestCase): 

""" Tests the pfs.model.utils.createHash() function. 

""" 

 

def testList(self): 

 

self.assertEqual(createHash('1', '2'), 0x39753077792b0554) 

 

def testListComprehension(self): 

listA = ['a', 'b'] 

listB = ['y', 'z'] 

listC = [a + b for a in listA for b in listB] 

 

self.assertEqual(createHash(listC), 0x6f0e879d749c2d60)