It will be used to get a canonical id for use in message keys
It really misses a docstring at module level to explain what it is and how to use it, and how are basic types serialized by this encoder.
I don't get the list used to gather results here. Why isn't this just a generator?
why not using pytest's test functions here? What's the value of using a TestCase?
rewrite with generators
I'm not sure what to write here; there's a single public function, and it's already documented.
Because I didn't think of using a generator.
I just rewrote it to use a generator, the code is almost the same (although generators are slightly slower), so I don't really care either way * shrug *
I use assertRaises.