Editing OutOfTreeModules
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 107: | Line 107: | ||
How hard could this be? Turns out that this is easy! So, we open <code>python/qa_square_ff.py</code>, which we edit to look like this: | How hard could this be? Turns out that this is easy! So, we open <code>python/qa_square_ff.py</code>, which we edit to look like this: | ||
< | <pre>from gnuradio import gr, gr_unittest | ||
from gnuradio import gr, gr_unittest | |||
from gnuradio import blocks | from gnuradio import blocks | ||
import howto_swig as howto | import howto_swig as howto | ||
Line 178: | Line 177: | ||
if __name__ == '__main__': | if __name__ == '__main__': | ||
gr_unittest.run(qa_square_ff, "qa_square_ff.yaml") | gr_unittest.run(qa_square_ff, "qa_square_ff.yaml") | ||
</ | </pre> | ||
gr_unittest is an extension to the standard Python module unittest. gr_unittest adds support for checking approximate equality of tuples of float and complex numbers. Unittest uses Python's reflection mechanism to find all methods that start with test_ and runs them. Unittest wraps each call to test_* with matching calls to setUp and tearDown. See the [http://docs.python.org/2/library/unittest.html Python unittest documentation] for details. | gr_unittest is an extension to the standard Python module unittest. gr_unittest adds support for checking approximate equality of tuples of float and complex numbers. Unittest uses Python's reflection mechanism to find all methods that start with test_ and runs them. Unittest wraps each call to test_* with matching calls to setUp and tearDown. See the [http://docs.python.org/2/library/unittest.html Python unittest documentation] for details. |