def test_epochs_hash():
 (raw, events) = _get_data()[:2]
 epochs = Epochs(raw, events, event_id, tmin, tmax)
 assert_raises(RuntimeError, epochs.__hash__)
 epochs = Epochs(raw, events, event_id, tmin, tmax, preload=True)
 assert_equal(hash(epochs), hash(epochs))
 epochs_2 = Epochs(raw, events, event_id, tmin, tmax, preload=True)
 assert_equal(hash(epochs), hash(epochs_2))
 assert_true((pickle.dumps(epochs) == pickle.dumps(epochs_2)))
 epochs_2._data[(0, 0, 0)] -= 1
 assert_not_equal(hash(epochs), hash(epochs_2))

def test_epochs_hash ( ) : ( raw , events ) = _get_data ( ) [ : 2 ] epochs = Epochs ( raw , events , event_id , tmin , tmax ) assert_raises ( RuntimeError , epochs . __hash__ ) epochs = Epochs ( raw , events , event_id , tmin , tmax , preload = True ) assert_equal ( hash ( epochs ) , hash ( epochs ) ) epochs_2 = Epochs ( raw , events , event_id , tmin , tmax , preload = True ) assert_equal ( hash ( epochs ) , hash ( epochs_2 ) ) assert_true ( ( pickle . dumps ( epochs ) == pickle . dumps ( epochs_2 ) ) ) epochs_2 . _data [ ( 0 , 0 , 0 ) ] -= 1 assert_not_equal ( hash ( epochs ) , hash ( epochs_2 ) )
test epoch hashing .