Message133225
| Author |
fabioz |
| Recipients |
fabioz |
| Date |
2011年04月07日.16:15:56 |
| SpamBayes Score |
2.6329577e-05 |
| Marked as misclassified |
No |
| Message-id |
<1302192957.51.0.450503345302.issue11798@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Right now, when doing a test case, one must clear all the variables created in the test class, and I believe this shouldn't be needed...
E.g.:
class Test(TestCase):
def setUp(self):
self.obj1 = MyObject()
...
def tearDown(self):
del self.obj1
Ideally (in my view), right after running the test, it should be garbage-collected and the explicit tearDown wouldn't be needed (as the test would garbage-collected, that reference would automatically die), because this is currently very error prone... (and probably a source of leaks for any sufficiently big test suite).
If that's accepted, I can provide a patch. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2011年04月07日 16:15:57 | fabioz | set | recipients:
+ fabioz |
| 2011年04月07日 16:15:57 | fabioz | set | messageid: <1302192957.51.0.450503345302.issue11798@psf.upfronthosting.co.za> |
| 2011年04月07日 16:15:56 | fabioz | link | issue11798 messages |
| 2011年04月07日 16:15:56 | fabioz | create |
|