On 06/07/2013 09:54 AM, Olemis Lang wrote:
On 6/7/13, Ethan Furman <et...@stoneleaf.us> wrote:
Is there a doctest mailing list?  I couldn't find it.


JFTR, Testing-in-Python (TiP) ML should be the right target for
general purpose questions about testing, considering docs even for
unittest and doctest
http://lists.idyll.org/listinfo/testing-in-python

Cool, thanks.


[...]
Any advice on how to make it work?

Here's the excerpt:

===============================================================================
Pickling
--------

Enumerations can be pickled and unpickled::

      >>> from enum import Enum
      >>> class Fruit(Enum):
      ...     tomato = 1
      ...     banana = 2
      ...     cherry = 3
      ...
      >>> from pickle import dumps, loads
      >>> Fruit.tomato is loads(dumps(Fruit.tomato))
      True


... but it seems I'm still getting in tests an instance of Fruit after
invoking loads (do you ?)

I'm not sure what you mean by "an instance of Fruit" -- you should be getting an instance of Fruit; specifically the tomato instance.

--
~Ethan~
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to