doctests to unittests