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 DqASe
Recipients DqASe, steven.daprano
Date 2016-04-29.12:18:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1461932319.85.0.109655757342.issue26878@psf.upfronthosting.co.za>
In-reply-to
Content
I see your point. I thought it can still be useful in these scenarios:

1. when doc/testing tens of methods of a specific class. Instantiation of the class is repetitive (DRY principle).
2. Instantiation can be expensive (e.g. from network)
3. To behave less-surprisingly (why can't I re-use objects created in an earlier test, but I can re-use the internal state of mutable ones?)
4. An aspiration for tests to be forcibly sandboxed from the execution environment (that would require deep copies by default).
5. Relying on an always-equal global state is better (IMHO) than relying on a *mutable* global state, after all.

But I understand it's debatable. Thanks anyways.
History
Date User Action Args
2016-04-29 12:18:39DqASesetrecipients: + DqASe, steven.daprano
2016-04-29 12:18:39DqASesetmessageid: <1461932319.85.0.109655757342.issue26878@psf.upfronthosting.co.za>
2016-04-29 12:18:39DqASelinkissue26878 messages
2016-04-29 12:18:39DqASecreate