This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients MCBama, paul.moore, r.david.murray, steve.dower, tim.golden, zach.ware
Date 2017-08-22.23:20:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1503444006.29.0.481549916153.issue31261@psf.upfronthosting.co.za>
In-reply-to
Content
GC cleanup is not guaranteed to be synchronous.  You are observing normal Python behavior here.  Cleanup does not happen until the TestCase instance is finalized (thus eliminating the self.dummy reference to your DummyClass).  In the case of passing tests, that is after the '.' is printed.  In the case of failing tests, that is after the failure is printed, which isn't until the failure summary is printed at after running all tests.

If it is important to you that DummyClass be finalized, you need to add an addCleanup call to your setUp method that will do whatever finalization you need done.  Including doing 'del self.dummy' (or self.dummy = None) if you need the reference to it gone...but depending on garbage collection is a bad idea, so if you are doing that there is probably something sub-optimal about your design.
History
Date User Action Args
2017-08-22 23:20:06r.david.murraysetrecipients: + r.david.murray, paul.moore, tim.golden, zach.ware, steve.dower, MCBama
2017-08-22 23:20:06r.david.murraysetmessageid: <1503444006.29.0.481549916153.issue31261@psf.upfronthosting.co.za>
2017-08-22 23:20:06r.david.murraylinkissue31261 messages
2017-08-22 23:20:06r.david.murraycreate