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 pje
Recipients hoffman, loewis, pje, slinkp
Date 2008-04-27.18:25:42
SpamBayes Score 0.060624536
Marked as misclassified No
Message-id <1209320744.21.0.483451135088.issue1180@psf.upfronthosting.co.za>
In-reply-to
Content
I much prefer the simpler of the two patches - better to monkeypatch in
the tests than adding complications to the already over-complicated
distutils.dist.  I don't find monkeypatching in tests to be horrible at
all, but if it really bothers you, just create a temporary directory for
HOME to point to, and test a Distribution subclass with an overridden
check_environ. 

By the way, the patch could be simpler if you just made the "if 'HOME'
in os.environ" read "if not self.no_user_cfg and 'HOME' in os.environ",
rather than reworking the entire code region.  On the other hand, if
you'd rather have ultra-clean unit tests, you could split the
functionality of find_config_files() into two methods: one that creates
the candidate list and the other that filters it by existence.

Personally, my vote is to keep the monkeypatching in the tests and make
the barest minimal changes to the Distribution class though.
History
Date User Action Args
2008-04-27 18:25:44pjesetspambayes_score: 0.0606245 -> 0.060624536
recipients: + pje, loewis, hoffman, slinkp
2008-04-27 18:25:44pjesetspambayes_score: 0.0606245 -> 0.0606245
messageid: <1209320744.21.0.483451135088.issue1180@psf.upfronthosting.co.za>
2008-04-27 18:25:43pjelinkissue1180 messages
2008-04-27 18:25:42pjecreate