[Python-Dev] Re: [Python-checkins] python/dist/src/Lib/email/test test_email_codecs.py,1.1,1.2
Barry A. Warsaw
barry@zope.com
Sun, 28 Jul 2002 19:51:38 -0400
>>>>> "GvR" == Guido van Rossum <guido@python.org> writes:
>> It's a bit uglier than that because since Lib/test gets
>> magically added to sys.path during regrtest by virtue of
>> running "python Lib/test/regrtest.py".
GvR> Perhaps regrtest.py can specifically remove its own directory
GvR> from sys.path? (Please don't just remove sys.path[0] or '';
GvR> look in sys.argv[0] and deduce from there.)
Good idea:
-------------------- snip snip --------------------
mydir = os.path.dirname(sys.argv[0])
sys.path.remove(mydir)
-------------------- snip snip --------------------
I also followed up to Guido privately, re: the motivation for this
change. Also, Neal's right, I missed some of the relative imports of
test_support and I'm ready to commit those fixes once Guido gives the
go ahead.
-Barry