summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/python
diff options
context:
space:
mode:
authorTom Rondeau <trondeau@vt.edu>2012-12-06 14:10:39 -0500
committerTom Rondeau <trondeau@vt.edu>2012-12-06 14:10:39 -0500
commit69990c3fb6d4c7a0daee0229407241aa1959095a (patch)
tree0e36c856893c33801a8d6f56421ecc3bf487319b /gnuradio-core/src/python
parent53be45f118e6e73d2a50fe0ba4622d6dfe96117c (diff)
core: Adding function to retrieve the symbol names of a blocks message ports.
Updated qa_pdu tests to verify this.
Diffstat (limited to 'gnuradio-core/src/python')
-rwxr-xr-xgnuradio-core/src/python/gnuradio/gr/qa_pdu.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_pdu.py b/gnuradio-core/src/python/gnuradio/gr/qa_pdu.py
index da1331d968..bf02d12c10 100755
--- a/gnuradio-core/src/python/gnuradio/gr/qa_pdu.py
+++ b/gnuradio-core/src/python/gnuradio/gr/qa_pdu.py
@@ -43,6 +43,27 @@ class test_pdu(gr_unittest.TestCase):
dbg = gr.message_debug()
+ # Test that the right number of ports exist.
+ pi = dbg.message_ports_in()
+ po = dbg.message_ports_out()
+ self.assertEqual(pmt.pmt_length(pi), 2)
+ self.assertEqual(pmt.pmt_length(po), 0)
+
+ pi = snk3.message_ports_in()
+ po = snk3.message_ports_out()
+ self.assertEqual(pmt.pmt_length(pi), 0)
+ self.assertEqual(pmt.pmt_length(po), 1)
+
+ #print "Message Debug input ports: "
+ #pmt.pmt_print(pi)
+ #print "Message Debug output ports: "
+ #pmt.pmt_print(po)
+
+ #print "Stream to PDU input ports: "
+ #pmt.pmt_print(pi)
+ #print "Stream to PDU output ports: "
+ #pmt.pmt_print(po)
+
self.tb.connect(src, snk)
self.tb.connect(src, snk2)
self.tb.connect(src, snk3)