diff options
author | Tom Rondeau | 2011-12-30 13:49:14 -0500 |
---|---|---|
committer | Tom Rondeau | 2011-12-30 13:49:14 -0500 |
commit | dd84c8dfcb30617dbac56f49a57c1e363afe643b (patch) | |
tree | e6e4e71634dc4dc3f5e85ab5ff2c92e7ada8fa78 /gnuradio-core/src/python | |
parent | 0cdc6e67f575f6c86ad12734f87cf83aed72b102 (diff) | |
parent | 9838bb040af5eb21cd88dbc9aae8d4bdf2838854 (diff) | |
download | gnuradio-dd84c8dfcb30617dbac56f49a57c1e363afe643b.tar.gz gnuradio-dd84c8dfcb30617dbac56f49a57c1e363afe643b.tar.bz2 gnuradio-dd84c8dfcb30617dbac56f49a57c1e363afe643b.zip |
Merge branch 'master' into next
Conflicts:
gr-digital/examples/Makefile.am
gr-digital/include/Makefile.am
gr-digital/lib/Makefile.am
gr-digital/python/Makefile.am
gr-digital/swig/Makefile.am
Diffstat (limited to 'gnuradio-core/src/python')
-rwxr-xr-x | gnuradio-core/src/python/gnuradio/gr/qa_fft_filter.py | 24 | ||||
-rwxr-xr-x | gnuradio-core/src/python/gnuradio/gr/qa_noise.py | 12 |
2 files changed, 36 insertions, 0 deletions
diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_fft_filter.py b/gnuradio-core/src/python/gnuradio/gr/qa_fft_filter.py index b3124ad29..f02f700a6 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_fft_filter.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_fft_filter.py @@ -273,6 +273,30 @@ class test_fft_filter(gr_unittest.TestCase): self.assert_fft_float_ok2(expected_result, result_data) + def test_fff_get0(self): + random.seed(0) + for i in xrange(25): + ntaps = int(random.uniform(2, 100)) + taps = make_random_float_tuple(ntaps) + + op = gr.fft_filter_fff(1, taps) + result_data = op.taps() + print result_data + + self.assertEqual(taps, result_data) + + def test_ccc_get0(self): + random.seed(0) + for i in xrange(25): + ntaps = int(random.uniform(2, 100)) + taps = make_random_complex_tuple(ntaps) + + op = gr.fft_filter_ccc(1, taps) + result_data = op.taps() + print result_data + + self.assertComplexTuplesAlmostEqual(taps, result_data, 4) + if __name__ == '__main__': gr_unittest.run(test_fft_filter, "test_fft_filter.xml") diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_noise.py b/gnuradio-core/src/python/gnuradio/gr/qa_noise.py index 4a575f5d6..d7750cfe2 100755 --- a/gnuradio-core/src/python/gnuradio/gr/qa_noise.py +++ b/gnuradio-core/src/python/gnuradio/gr/qa_noise.py @@ -34,6 +34,18 @@ class test_noise_source(gr_unittest.TestCase): # Just confirm that we can instantiate a noise source op = gr.noise_source_f(gr.GR_GAUSSIAN, 10, 10) + def test_002(self): + # Test get methods + set_type = gr.GR_GAUSSIAN + set_ampl = 10 + op = gr.noise_source_f(set_type, set_ampl, 10) + get_type = op.type() + get_ampl = op.amplitude() + + self.assertEqual(get_type, set_type) + self.assertEqual(get_ampl, set_ampl) + + if __name__ == '__main__': gr_unittest.run(test_noise_source, "test_noise_source.xml") |