[New-bugs-announce] [issue10326] Can't pickle unittest.TestCase instances

Michael Foord report at bugs.python.org
Fri Nov 5 15:17:29 CET 2010

New submission from Michael Foord <michael at voidspace.org.uk>:

In Python 2.7 a change was introduced to TestCase which involves storing a dictionary of method objects on TestCase instances. This makes them unpickleable.

unittest2 stores strings (method names) instead of method objects (a fix to make TestCase instances copyable under earlier versions of Python). The same fix could be applied to unittest.

assignee: michael.foord
components: Library (Lib)
keywords: easy
messages: 120496
nosy: michael.foord
priority: low
severity: normal
stage: needs patch
status: open
title: Can't pickle unittest.TestCase instances
type: behavior
versions: Python 2.7, Python 3.2

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list