moved doctest patterns into unittests