MCPcopy Create free account
hub / github.com/ImageEngine/cortex / testHash

Method testHash

test/IECore/PathMatcherDataTest.py:59–81  ·  view source on GitHub ↗
( self )

Source from the content-addressed store, hash-verified

57 self.assertEqual( dd.value, IECore.PathMatcher( [ "/a", "/b" ] ) )
58
59 def testHash( self ) :
60
61 d = IECore.PathMatcherData()
62
63 h = []
64 h.append( d.hash() )
65 self.assertNotEqual( h[0], IECore.MurmurHash() )
66
67 d.value.addPath( "/" )
68 h.append( d.hash() )
69 self.assertNotEqual( h[1], h[0] )
70
71 d.value.removePath( "/" )
72 h.append( d.hash() )
73 self.assertEqual( h[2], h[0] )
74
75 d.value.addPath( "/c/d" )
76 h.append( d.hash() )
77 self.assertNotEqual( h[3], h[2] )
78
79 d.value.addPath( "/c" )
80 h.append( d.hash() )
81 self.assertNotEqual( h[4], h[3] )
82
83 def testHierarchyAffectsHash( self ) :
84

Callers

nothing calls this directly

Calls 5

appendMethod · 0.80
MurmurHashMethod · 0.80
addPathMethod · 0.80
removePathMethod · 0.80
hashMethod · 0.45

Tested by

no test coverage detected