fix test code
remove unused doctest code