| 175 | self.assertEqual( b, bb ) |
| 176 | |
| 177 | def testHash( self ) : |
| 178 | |
| 179 | allHashes = set() |
| 180 | objectsCreated = 0 |
| 181 | for t in IECore.TypeId.names : |
| 182 | o = None |
| 183 | with IECore.IgnoredExceptions( RuntimeError ) : |
| 184 | o = IECore.Object.create( t ) |
| 185 | if o is not None : |
| 186 | objectsCreated += 1 |
| 187 | allHashes.add( str( o.hash() ) ) |
| 188 | h = IECore.MurmurHash() |
| 189 | o.hash( h ) |
| 190 | self.assertEqual( h, o.hash() ) |
| 191 | |
| 192 | self.assertEqual( len( allHashes ), objectsCreated ) |
| 193 | |
| 194 | if __name__ == "__main__": |
| 195 | unittest.main() |