summaryrefslogtreecommitdiff
path: root/gr-blocks/python
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@kit.edu>2013-05-12 14:16:56 +0200
committerMartin Braun <martin.braun@kit.edu>2013-05-12 14:18:15 +0200
commitcce6a69305cc475e8a37ba60ac1bc91659fa7f05 (patch)
tree4a4bf432ad8e176cd54b36a289fad680c6b92965 /gr-blocks/python
parent9851f2377d099ffe72312375e7f761f66b664aa6 (diff)
parent7be24afbf8857a5e827fb536a80d7a83e7b6aa31 (diff)
Merge branch 'master-ofdm', fixed conflicts
Diffstat (limited to 'gr-blocks/python')
-rwxr-xr-xgr-blocks/python/qa_tag_gate.py47
1 files changed, 47 insertions, 0 deletions
diff --git a/gr-blocks/python/qa_tag_gate.py b/gr-blocks/python/qa_tag_gate.py
new file mode 100755
index 0000000000..e3859a499e
--- /dev/null
+++ b/gr-blocks/python/qa_tag_gate.py
@@ -0,0 +1,47 @@
+#!/usr/bin/env python
+#
+# Copyright 2013 <+YOU OR YOUR COMPANY+>.
+#
+# This is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+from gnuradio import gr, gr_unittest
+import pmt
+import blocks_swig as blocks
+
+
+class qa_tag_gate (gr_unittest.TestCase):
+
+ def setUp (self):
+ self.tb = gr.top_block ()
+
+ def tearDown (self):
+ self.tb = None
+
+ def test_001_t (self):
+ tag = gr.gr_tag_t()
+ tag.key = pmt.string_to_symbol('key')
+ tag.value = pmt.from_long(42)
+ tag.offset = 0
+ src = blocks.vector_source_f(range(20), False, 1, (tag,))
+ gate = blocks.tag_gate(gr.sizeof_float, False)
+ sink = blocks.vector_sink_f()
+ self.tb.run ()
+ self.assertEqual(len(sink.tags()), 0)
+
+if __name__ == '__main__':
+ gr_unittest.run(qa_tag_gate, "qa_tag_gate.xml")
+