Use assertRaises to check for the NameError
Also corrected spelling of a word.
This commit is contained in:
parent
0cba44146a
commit
539330309b
@ -65,11 +65,10 @@ class TestCallback(unittest.TestCase):
|
||||
|
||||
def borked(i):
|
||||
"""
|
||||
this intentionally raises a NameError exception
|
||||
FIXME: could use an explanation
|
||||
or perhaps some explicit Try/Except code
|
||||
This intentionally raises a NameError exception
|
||||
"""
|
||||
rubish.append(i)
|
||||
with self.assertRaises(NameError):
|
||||
rubish.append(i)
|
||||
|
||||
t = TestSignals()
|
||||
|
||||
@ -87,7 +86,7 @@ class TestCallback(unittest.TestCase):
|
||||
log = _log
|
||||
|
||||
self.assertEqual(len(rl), 1, "No signal emitted")
|
||||
self.assertEqual(rl[0], 1, "Wrong argument recieved")
|
||||
self.assertEqual(rl[0], 1, "Wrong argument received")
|
||||
|
||||
def test_disconnect(self):
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user