Adding more tests to encoding.doctest