Fix comments and unittest for market.py and style

Trying to make the right commit to  the develop branch.
The fact that random numbers are used is an implementation detail and should not be part of the docstring.