BIND 10 trac2353, updated. f1035ba18d68d4a1fa89719a9dc8e5eb6ae24d84 [2353] Use assertRaises() instead of the excessive code
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu Nov 29 02:48:49 UTC 2012
The branch, trac2353 has been updated
via f1035ba18d68d4a1fa89719a9dc8e5eb6ae24d84 (commit)
from 0740a5d8df7f65518b2b87662b4375630e1838ef (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit f1035ba18d68d4a1fa89719a9dc8e5eb6ae24d84
Author: Mukund Sivaraman <muks at isc.org>
Date: Thu Nov 29 08:17:55 2012 +0530
[2353] Use assertRaises() instead of the excessive code
-----------------------------------------------------------------------
Summary of changes:
src/bin/bind10/tests/bind10_test.py.in | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/bind10/tests/bind10_test.py.in b/src/bin/bind10/tests/bind10_test.py.in
index e4bf192..f26052b 100644
--- a/src/bin/bind10/tests/bind10_test.py.in
+++ b/src/bin/bind10/tests/bind10_test.py.in
@@ -1619,16 +1619,11 @@ class TestBossComponents(unittest.TestCase):
return tmp_time()
time.time = _my_time
- thrown = False
- # An exception will be thrown here when it eventually times out.
- try:
+ with self.assertRaises(bind10_src.CChannelConnectError):
+ # An exception will be thrown here when it eventually times
+ # out.
pi = bob.start_msgq()
- except bind10_src.CChannelConnectError as e:
- thrown = True
- # We just check that an exception was thrown, and that several
- # attempts were made to connect.
- self.assertTrue(thrown)
# 1 second of attempts every 0.1 seconds should result in at
# least 5 attempts
self.assertGreater(attempts, 5)
More information about the bind10-changes
mailing list