diff options
author | Jacob Gilbert <mrjacobagilbert@gmail.com> | 2020-05-02 08:38:05 -0600 |
---|---|---|
committer | mormj <34754695+mormj@users.noreply.github.com> | 2020-05-05 13:12:28 -0400 |
commit | 941c6c895a5724c142cfb0a32220885062373d57 (patch) | |
tree | 2570272007f0cc061a41bd1fed04cb7c7d11fa86 /gnuradio-runtime/python/pmt | |
parent | 09b0db2b9852c9e9ab7606622d78d9bf83f584ef (diff) |
pmt: stop treating all pairs like they are dicts
create a new derived class for pmt dicts so they can be distinguished without complicated try/catch logic, updated QA with a few additional checks. also added an is_pdu() method which returns true if the pmt is a pair of a dict-type PMT and a uniform-vector type, otherwise false
Diffstat (limited to 'gnuradio-runtime/python/pmt')
-rw-r--r-- | gnuradio-runtime/python/pmt/qa_pmt.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gnuradio-runtime/python/pmt/qa_pmt.py b/gnuradio-runtime/python/pmt/qa_pmt.py index 44f616cdae..b165c8cd1a 100644 --- a/gnuradio-runtime/python/pmt/qa_pmt.py +++ b/gnuradio-runtime/python/pmt/qa_pmt.py @@ -163,6 +163,7 @@ class test_pmt(unittest.TestCase): d = pmt.dict_add(d, min_key, _min) s = pmt.serialize_str(d) deser = pmt.deserialize_str(s) + self.assertTrue(pmt.is_dict(deser)) self.assertTrue(pmt.equal(d, deser)) p_dict = pmt.to_python(deser) self.assertEqual(self.MAXINT32, p_dict["MAX"]) |