diff options
author | Monty Taylor <mordred@inaugust.com> | 2013-02-06 17:01:30 +1100 |
---|---|---|
committer | Akihiro MOTOKI <motoki@da.jp.nec.com> | 2013-02-26 19:32:30 +0900 |
commit | 511ac76cf25109164ec39a562f0602c40987bd6f (patch) | |
tree | 53b60650cd13206df0bad802e1d9b3f288160778 /HACKING.rst | |
parent | 2ba9554bf4c2b81f6700966e51b693ba3e05c978 (diff) | |
download | neutron-511ac76cf25109164ec39a562f0602c40987bd6f.tar.gz |
Use testtools instead of unittest or unittest2.
As part of the move towards testr and parallel test running, we
start to use testtools and fixtures to make the test suite
resilient and more pedantic.
Part of blueprint grizzly-testtools
Change-Id: I90250de9fe21237db34f6a50b89b15863e270aa5
Diffstat (limited to 'HACKING.rst')
-rw-r--r-- | HACKING.rst | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/HACKING.rst b/HACKING.rst index 0423c41e12..4333d25685 100644 --- a/HACKING.rst +++ b/HACKING.rst @@ -66,9 +66,9 @@ Example:: import random import StringIO import time - import unittest import eventlet + import testtools import webob.exc import quantum.api.networks @@ -199,6 +199,12 @@ bug that had no unit test, a new passing unit test should be added. If a submitted bug fix does have a unit test, be sure to add a new one that fails without the patch and passes with the patch. +All unittest classes must ultimately inherit from testtools.TestCase. +All setUp and tearDown methods must upcall using the super() method. +tearDown methods should be avoided and addCleanup calls should be preferred. +Never manually create tempfiles. Always use the tempfile fixtures from +the fixture library to ensure that they are cleaned up. + openstack-common ---------------- |