Convert tests to doctests