diff options
author | Josh Morman <mormjb@gmail.com> | 2020-04-23 09:58:59 -0400 |
---|---|---|
committer | Josh Morman <mormjb@gmail.com> | 2020-06-04 10:05:47 -0400 |
commit | 0249f7ce0cf5173b946b936c5cd66380afc8bf92 (patch) | |
tree | 587f3da2a664c9589fdc7a1d0533a8b76af0c3ec /gnuradio-runtime/python/gnuradio | |
parent | 5322a1ff0066bee025b2ea9af550aad4b461d5e0 (diff) |
runtime: replace py gateway with pybind11 support, remove feval
Diffstat (limited to 'gnuradio-runtime/python/gnuradio')
-rw-r--r-- | gnuradio-runtime/python/gnuradio/gr/qa_feval.py | 99 |
1 files changed, 0 insertions, 99 deletions
diff --git a/gnuradio-runtime/python/gnuradio/gr/qa_feval.py b/gnuradio-runtime/python/gnuradio/gr/qa_feval.py deleted file mode 100644 index 7018fd9f1a..0000000000 --- a/gnuradio-runtime/python/gnuradio/gr/qa_feval.py +++ /dev/null @@ -1,99 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2006,2007,2010 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# SPDX-License-Identifier: GPL-3.0-or-later -# -# - - -from gnuradio import gr, gr_unittest - -class my_add2_dd(gr.feval_dd): - def eval(self, x): - return x + 2 - -class my_add2_ll(gr.feval_ll): - def eval(self, x): - return x + 2 - -class my_add2_cc(gr.feval_cc): - def eval(self, x): - return x + (2 - 2j) - -class my_feval(gr.feval): - def __init__(self): - gr.feval.__init__(self) - self.fired = False - def eval(self): - self.fired = True - -class test_feval(gr_unittest.TestCase): - - def test_dd_1(self): - f = my_add2_dd() - src_data = (0.0, 1.0, 2.0, 3.0, 4.0) - expected_result = (2.0, 3.0, 4.0, 5.0, 6.0) - # this is all in python... - actual_result = tuple([f.eval(x) for x in src_data]) - self.assertEqual(expected_result, actual_result) - - def test_dd_2(self): - f = my_add2_dd() - src_data = (0.0, 1.0, 2.0, 3.0, 4.0) - expected_result = (2.0, 3.0, 4.0, 5.0, 6.0) - # this is python -> C++ -> python and back again... - actual_result = tuple([gr.feval_dd_example(f, x) for x in src_data]) - self.assertEqual(expected_result, actual_result) - - - def test_ll_1(self): - f = my_add2_ll() - src_data = (0, 1, 2, 3, 4) - expected_result = (2, 3, 4, 5, 6) - # this is all in python... - actual_result = tuple([f.eval(x) for x in src_data]) - self.assertEqual(expected_result, actual_result) - - def test_ll_2(self): - f = my_add2_ll() - src_data = (0, 1, 2, 3, 4) - expected_result = (2, 3, 4, 5, 6) - # this is python -> C++ -> python and back again... - actual_result = tuple([gr.feval_ll_example(f, x) for x in src_data]) - self.assertEqual(expected_result, actual_result) - - - def test_cc_1(self): - f = my_add2_cc() - src_data = (0+1j, 2+3j, 4+5j, 6+7j) - expected_result = (2-1j, 4+1j, 6+3j, 8+5j) - # this is all in python... - actual_result = tuple([f.eval(x) for x in src_data]) - self.assertEqual(expected_result, actual_result) - - def test_cc_2(self): - f = my_add2_cc() - src_data = (0+1j, 2+3j, 4+5j, 6+7j) - expected_result = (2-1j, 4+1j, 6+3j, 8+5j) - # this is python -> C++ -> python and back again... - actual_result = tuple([gr.feval_cc_example(f, x) for x in src_data]) - self.assertEqual(expected_result, actual_result) - - def test_void_1(self): - # this is all in python - f = my_feval() - f.eval() - self.assertEqual(True, f.fired) - - def test_void_2(self): - # this is python -> C++ -> python and back again - f = my_feval() - gr.feval_example(f) - self.assertEqual(True, f.fired) - - -if __name__ == '__main__': - gr_unittest.run(test_feval, "test_feval.xml") |