discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Python Unit Tests Running Twice


From: Dave NotTelling
Subject: Re: [Discuss-gnuradio] Python Unit Tests Running Twice
Date: Fri, 17 Jun 2016 10:07:12 -0400

Kevin,

     Your comments got me thinking about my destructors.  After poking around a bit I realized that one of the constructors (the actual radio interface) was never firing.  Turns out that I was not calling delete() on the pointer to the radio manager instance.  Once I fixed that everything just works.  Still runs twice which is just odd to me, but it does work as expected!

     Thank you for guiding me in the right direction :D

-Dave

On Thu, Jun 16, 2016 at 11:51 PM, Kevin Reid <address@hidden> wrote:
On Thu, Jun 16, 2016 at 8:48 PM, Dave NotTelling <address@hidden> wrote:
     The radio is released properly when the destructor is called, but it's not getting called for some reason.  I have several C++ tests that work like a champ, but the Python test doesn't actually release the resources that were allocated.  I even tried assigning my block that talks to the radio to a variable in self (self.radio) and then setting it to None in the tearDown method.  The resources still are not released.  If I stop a GNU Radio flow graph that uses my block then everything is released just fine.  Even when the Python test finishes (after the second run) the resources are released.  It's just that the resources are not released between the back to back runs of the same test.

Well, if your test involves a flow graph then make sure you're (stopping and) discarding any references to the flow graph as well, since that will hold onto the block.

Can you share your Python code?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]