diff options
Diffstat (limited to 'gnuradio-runtime/python/gnuradio/gr/qa_hier_block2.py')
-rw-r--r-- | gnuradio-runtime/python/gnuradio/gr/qa_hier_block2.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gnuradio-runtime/python/gnuradio/gr/qa_hier_block2.py b/gnuradio-runtime/python/gnuradio/gr/qa_hier_block2.py index 50b1562f3a..a079f8de70 100644 --- a/gnuradio-runtime/python/gnuradio/gr/qa_hier_block2.py +++ b/gnuradio-runtime/python/gnuradio/gr/qa_hier_block2.py @@ -66,14 +66,12 @@ class test_hier_block2(gr_unittest.TestCase): self.assertEqual(expected, self.call_log) def test_005(self): - with self.assertRaises(ValueError) as c: + with self.assertRaises(ValueError): self.multi((self.Block(), 5)) - self.assertIsInstance(c.exception, ValueError) def test_006(self): - with self.assertRaises(ValueError) as c: - self.multi(self.Block(), (self.Block(), 5, 5)) - self.assertIsInstance(c.exception, ValueError) + with self.assertRaises(ValueError): + self.multi(self.Block(), (5, 5)) def test_007(self): b1, b2 = self.Block(), self.Block() @@ -85,6 +83,10 @@ class test_hier_block2(gr_unittest.TestCase): self.opt((b1, "in"), (b2, "out")) self.assertEqual([(b1, "in", b2, "out")], self.call_log) + def test_009(self): + with self.assertRaises(ValueError): + self.multi(self.Block(), 5) + if __name__ == '__main__': gr_unittest.run(test_hier_block2, "test_hier_block2.xml") |