I created a module named detector0 with one input argument: int len. In the
python qa file, I set the len to 20. However, when I issued the command:
ctest -V -R detector0, I got the following error:
2: Test timeout computed to be: 9.99988e+06
2: E
2: =================================================================
2: ERROR: test_001_detector0 (__main__.qa_detector0)
2: ----------------------------------------------------------------------
2: Traceback (most recent call last):
2: File "qa_detector0.py", line 42, in test_001_detector0
2: self.tb.connect(detec. dst)
2: AttributeError: 'detector0_sptr' object has no attribute 'dst'
My related python codes are as follows:
src = blocks.vector_source_f(src_data)
d_len = 20
detec = detectors.detector0(d_len)
dst = blocks.vector_sink_f()
self.tb.connect(src, detec)
self.tb.connect(detec. dst)
# set up fg
self.tb.run ()
# check data
result_data = dst.data()
self.assertFloatTuplesAlmostEqual(expected_result, result_data, 6)
I couldn't see any problems in the connection: self.tb.connect(detec.
dst).
Any advice on solving this AttributeError?
_______________________________________________
Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio