From cd1f3306405980e80d6325ee433eb5fdfb358afa Mon Sep 17 00:00:00 2001 From: jcorgan Date: Fri, 20 Mar 2009 03:25:45 +0000 Subject: Adds QA code for ticket:237 fix git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10661 221aa14e-8319-0410-a670-987f0aec2ac5 --- gnuradio-core/src/python/gnuradio/gr/qa_hier_block2.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'gnuradio-core/src') diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_hier_block2.py b/gnuradio-core/src/python/gnuradio/gr/qa_hier_block2.py index 7249a2194..9c31dc177 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_hier_block2.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_hier_block2.py @@ -239,6 +239,18 @@ class test_hier_block2(gr_unittest.TestCase): tb.connect(hb) tb.run() self.assertEquals(expected_data, dst.data()) + + def test_027_disconnected_internal(self): + tb = gr.top_block() + hb = gr.hier_block2("block", + gr.io_signature(1, 1, 1), + gr.io_signature(1, 1, 1)) + src = gr.vector_source_b([1, ]) + dst = gr.vector_sink_b() + tb.connect(src, hb, dst) # hb is not connected internally + self.assertRaises(RuntimeError, + lambda: tb.run()) + if __name__ == "__main__": gr_unittest.main() -- cgit