summaryrefslogtreecommitdiffstats
path: root/nova/openstack
diff options
context:
space:
mode:
authorJohannes Erdfelt <johannes.erdfelt@rackspace.com>2012-10-01 16:38:50 +0000
committerJohannes Erdfelt <johannes.erdfelt@rackspace.com>2012-10-01 17:13:22 +0000
commit8aed4b0d221a56a7f7e405d0023b126119dbd6b2 (patch)
tree548a8a645a3eec05c2ccb99e0d544fea419d6120 /nova/openstack
parent878dd9c0e29aeff4b485c28c63ba6c607fa7ca10 (diff)
downloadnova-8aed4b0d221a56a7f7e405d0023b126119dbd6b2.tar.gz
nova-8aed4b0d221a56a7f7e405d0023b126119dbd6b2.tar.xz
nova-8aed4b0d221a56a7f7e405d0023b126119dbd6b2.zip
Remove TestCase.assertNotRaises
assertNotRaises appears to have been added to provide an easier way to assert that an exception should not be raised by a particular call in the test. However, the implementation has a couple of problems. The first is that it catches every other exception than the one specified, and silently ignores them. This had lead to one bug where a legitimate bug in the test (test_exception_with_rescheduling_enabled) was silently ignored. The call intended to be tested was called with too few arguments and the resulting TypeError was silently ignored. The second is that assertNotRaises could be called with None, which meant that no exceptions should be raised. However, this didn't do anything other than reraise the original exception. Calling assertNotRaises just adds an extra call with no value. From a design stand point, it's not clear what value this assertion provides since the test runner will already fail a test if an exception is raised. Change-Id: I64502dfa0e873f2bbd9b733a5fb63023e1b4e296
Diffstat (limited to 'nova/openstack')
0 files changed, 0 insertions, 0 deletions