diff options
author | Marcus Müller <mmueller@gnuradio.org> | 2021-06-12 22:31:55 +0200 |
---|---|---|
committer | mormj <34754695+mormj@users.noreply.github.com> | 2021-06-19 19:46:17 -0400 |
commit | 2556a301718f4647b284c6b8ad57748064a3dad3 (patch) | |
tree | dc19709794963e77413ba6687b267c10c3fd08eb /gnuradio-runtime/python/gnuradio/gr/qa_flowgraph.py | |
parent | e1b633a95047fce266e575cbc66a314d31c24491 (diff) |
testing: rm dependencies from disabled components in blocks/runtime tests
This included shifting of the PDU test from runtime to gr-pdu, and
making the tests that actually require blocks conditional on whether
there's going to be gr-blocks. Also, don't use gr-analog just because
you need data.
Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
Diffstat (limited to 'gnuradio-runtime/python/gnuradio/gr/qa_flowgraph.py')
-rw-r--r-- | gnuradio-runtime/python/gnuradio/gr/qa_flowgraph.py | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/gnuradio-runtime/python/gnuradio/gr/qa_flowgraph.py b/gnuradio-runtime/python/gnuradio/gr/qa_flowgraph.py index a59d0437a5..bbf979d0eb 100644 --- a/gnuradio-runtime/python/gnuradio/gr/qa_flowgraph.py +++ b/gnuradio-runtime/python/gnuradio/gr/qa_flowgraph.py @@ -1,6 +1,7 @@ #!/usr/bin/env python # # Copyright 2016 Free Software Foundation, Inc. +# Copyright 2021 Marcus Müller # # This file is part of GNU Radio # @@ -9,9 +10,7 @@ # -import time -import pmt -from gnuradio import gr, gr_unittest, blocks, pdu +from gnuradio import gr, gr_unittest class test_flowgraph (gr_unittest.TestCase): @@ -22,27 +21,9 @@ class test_flowgraph (gr_unittest.TestCase): def tearDown(self): self.tb = None - def test_000(self): - + def test_000_empty_fg(self): self.tb.start() - self.tb.lock() - - rem = pdu.pdu_remove(pmt.intern('foo')) - dbg = blocks.message_debug() - self.tb.msg_connect((rem, 'pdus'), (dbg, 'store')) - - self.tb.unlock() - - msg = pmt.cons(pmt.PMT_NIL, pmt.init_u8vector(3, (1, 2, 3))) - rem.to_basic_block()._post(pmt.intern('pdus'), msg) - time.sleep(0.2) - self.tb.stop() - self.assertEqual(dbg.num_messages(), 1) - data = pmt.u8vector_elements(pmt.cdr(dbg.get_message(0))) - self.assertEqual([1, 2, 3], data) - - if __name__ == '__main__': gr_unittest.run(test_flowgraph) |