summaryrefslogtreecommitdiffstats
path: root/nova/context.py
diff options
context:
space:
mode:
authorJohannes Erdfelt <johannes.erdfelt@rackspace.com>2012-03-06 16:58:03 +0000
committerJohannes Erdfelt <johannes.erdfelt@rackspace.com>2012-03-07 15:52:40 +0000
commitfb7d1fb8253e55437858358793c9fb02fbff0ba0 (patch)
tree3b3a49bc9f91a96982a65ca1d7302f16c80a72be /nova/context.py
parentd8324bb3d089acd444bd1639a3efc07e89556f69 (diff)
downloadnova-fb7d1fb8253e55437858358793c9fb02fbff0ba0.tar.gz
nova-fb7d1fb8253e55437858358793c9fb02fbff0ba0.tar.xz
nova-fb7d1fb8253e55437858358793c9fb02fbff0ba0.zip
Clear created attributes when tearing down tests
unittest will keep each test case around after completion pinning any objects references by attributes on the test case. This can bloat the memory used during a full test suite run to the point where the test suite will require much more memory than running all of the services does. On systems witout lots of memory, test suite failures will occur as test cases cannot fork to execute programs. Clearing out __dict__ of any attributes that don't start with a _ (since some are needed by unittest itself) reduces memory significantly. This does require the super class tearDown to be called last in some cases however. Change-Id: I0e660b6c2a77c5613c5a523ba0a64c3d7f6dd128
Diffstat (limited to 'nova/context.py')
0 files changed, 0 insertions, 0 deletions