Hi GNURADIOers,
I wanted to tell you that test for my block runs twice.
Namely, I designed block based on tagged_file_sink, which is able to
store
some
additional samples before true tag.
I designed also test, but when I run it, it simply executes twice.
at the bottom of my qa file you can find this:
self.tb.run ()
print "\nAfter run!\n"
result_data = (0, 1, 1, 0, 0, 1, 1)
expected_result = (0, 1, 1, 0, 0, 1, 1)
self.assertEqual (expected_result, result_data, 6)
and I am able to see in terminal twice “After run”, and there are also
two
files produced by the block itself.
I discovered that at very end of my qa file, there is:
if name == ‘main’:
gr_unittest.run(qa_file_sink_history, “qa_file_sink_history.xml”)
but in some older test one can find this:
if name == ‘main’:
gr_unittest.main ()
When change first one with the second one, test executes once as it
should
be.
Can anybody explain me this behaviour?
Best