Make doctest more deterministic