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

Method testFromString

test/IECore/MurmurHashTest.py:76–87  ·  view source on GitHub ↗
( self )

Source from the content-addressed store, hash-verified

74 self.assertEqual( h, h2 )
75
76 def testFromString( self ) :
77
78 h = IECore.MurmurHash()
79 h.append( 1 )
80 h.append( "hello" )
81
82 s = h.toString()
83 hs = IECore.MurmurHash.fromString( s )
84 self.assertEqual( h, hs )
85
86 with self.assertRaisesRegex( Exception, ".*must have 32 characters.*" ) :
87 IECore.MurmurHash.fromString( "InvalidStringRepresentation" )
88
89 def testAppend( self ) :
90

Callers

nothing calls this directly

Calls 4

toStringMethod · 0.95
MurmurHashMethod · 0.80
appendMethod · 0.80
fromStringMethod · 0.80

Tested by

no test coverage detected