BUG: fix tests to not depend on egginst output pseudo-randomness.