fix test with debug output.
fixing unit test generator.
some pep8. fix unit tests.