diff options
author | Tom Rondeau | 2011-12-22 18:20:06 -0500 |
---|---|---|
committer | Tom Rondeau | 2011-12-22 18:20:06 -0500 |
commit | 5cd411a7e260b0721fecbac6c53b0717b2adf7e6 (patch) | |
tree | 30d7df6df1847f0883f3c49c740070592ea6c303 /gnuradio-core/src/python | |
parent | 5faab4fbcf423cc614d53f0f3c557c2f055b7ed0 (diff) | |
download | gnuradio-5cd411a7e260b0721fecbac6c53b0717b2adf7e6.tar.gz gnuradio-5cd411a7e260b0721fecbac6c53b0717b2adf7e6.tar.bz2 gnuradio-5cd411a7e260b0721fecbac6c53b0717b2adf7e6.zip |
core: added accessors to noise_source to get type and amplitude of object.
Diffstat (limited to 'gnuradio-core/src/python')
-rwxr-xr-x | gnuradio-core/src/python/gnuradio/gr/qa_noise.py | 12 |
1 files changed, 12 insertions, 0 deletions
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") |