diff options
Diffstat (limited to 'gr-blocks/python/blocks/qa_nlog10.py')
-rw-r--r--[-rwxr-xr-x] | gr-blocks/python/blocks/qa_nlog10.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gr-blocks/python/blocks/qa_nlog10.py b/gr-blocks/python/blocks/qa_nlog10.py index 0194e85d48..94269c34f0 100755..100644 --- a/gr-blocks/python/blocks/qa_nlog10.py +++ b/gr-blocks/python/blocks/qa_nlog10.py @@ -20,6 +20,7 @@ # Boston, MA 02110-1301, USA. # + from gnuradio import gr, gr_unittest, blocks class test_nlog10(gr_unittest.TestCase): @@ -31,15 +32,15 @@ class test_nlog10(gr_unittest.TestCase): self.tb = None def test_001(self): - src_data = (-10, 0, 10, 100, 1000, 10000, 100000) - expected_result = (-180, -180, 10, 20, 30, 40, 50) + src_data = (1, 10, 100, 1000, 10000, 100000) + expected_result = (0, 10, 20, 30, 40, 50) src = blocks.vector_source_f(src_data) op = blocks.nlog10_ff(10) dst = blocks.vector_sink_f() self.tb.connect (src, op, dst) self.tb.run() result_data = dst.data() - self.assertFloatTuplesAlmostEqual (expected_result, result_data) + self.assertFloatTuplesAlmostEqual (expected_result, result_data, 5) if __name__ == '__main__': |