Fix comments and unittest for market.py and style

Trying to make the right commit to  the develop branch.
I tried to get out of the content of the variable input. But there were problems (str-unicode) with the module StringIO. At first I used the io. 

And the thought that there is not set log. Therefore experimented.

Possible to delete these comments.