@agramfort Ok. Thanks for the link. It is similar to Bertrand's suggestion: checking that we obtain significant or non-significant p-values according to controlled designs.

@bthirion Thanks for this result that I was not aware of. Actually I found no simple and concise way to compute the values corresponding to n.f.F^{n-1}'s cumulative density function so I relied on the fact that the max is equal to the single available score when n_targets == 1.

I added a test about the improvement of h0's estimation when n_perm increases (i.e. consistency of the algorithm).

Thanks @rphlypo for very helpful suggestions. Does it look like what you had in mind?