Unit test fixes

Unit test fixes, including:
- deterministic ordering in probability.doctest