Files
python-ganttclient/nova/tests
Johannes Erdfelt 876ccd0340 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
2012-10-01 17:13:22 +00:00
..
2012-09-18 08:54:25 -07:00
2012-10-01 17:13:22 +00:00
2012-09-18 08:54:25 -07:00
2011-08-04 23:01:22 -05:00
2012-09-18 08:54:25 -07:00
2012-10-01 17:13:22 +00:00
2012-10-01 17:13:22 +00:00