Phillip J. Eby <[EMAIL PROTECTED]> added the comment: 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. __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1180> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com