@testing.requires_testing_data
def test_hash_raw():
 raw = read_raw_fif(fif_fname)
 assert_raises(RuntimeError, raw.__hash__)
 raw = read_raw_fif(fif_fname).crop(0, 0.5)
 raw_size = raw._size
 raw.load_data()
 raw_load_size = raw._size
 assert_true((raw_size < raw_load_size))
 raw_2 = read_raw_fif(fif_fname).crop(0, 0.5)
 raw_2.load_data()
 assert_equal(hash(raw), hash(raw_2))
 assert_equal(pickle.dumps(raw), pickle.dumps(raw_2))
 raw_2._data[(0, 0)] -= 1
 assert_not_equal(hash(raw), hash(raw_2))

@ testing . requires_testing_data def test_hash_raw ( ) : raw = read_raw_fif ( fif_fname ) assert_raises ( RuntimeError , raw . __hash__ ) raw = read_raw_fif ( fif_fname ) . crop ( 0 , 0.5 ) raw_size = raw . _size raw . load_data ( ) raw_load_size = raw . _size assert_true ( ( raw_size < raw_load_size ) ) raw_2 = read_raw_fif ( fif_fname ) . crop ( 0 , 0.5 ) raw_2 . load_data ( ) assert_equal ( hash ( raw ) , hash ( raw_2 ) ) assert_equal ( pickle . dumps ( raw ) , pickle . dumps ( raw_2 ) ) raw_2 . _data [ ( 0 , 0 ) ] -= 1 assert_not_equal ( hash ( raw ) , hash ( raw_2 ) )
test hashing raw objects .