doctesting becomes slightly harder when targeting both python 2 and 3, since 'text' != b'text' and u'text' != 'text', so you really cannot compare returned strings directly