Add some testcase using unittest because I don't familiar with doctest.