Message9884

Author jeff.allen
Recipients jeff.allen, zyasoft
Date 2015-04-19.09:39:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1429436377.2.0.967423683465.issue2332@psf.upfronthosting.co.za>
In-reply-to
Content
If I put a bit of self-explanatory debug into findtestdir, I see:
findtestdir: __name__ = __main__
findtestdir: sys.argv[0] = test.regrtest
findtestdir: __file__ = <path to Jython>\dist\Lib\test\regrtest.py
findtestdir: os.curdir = .

The same debug in a Jython reverted to just after Christmas gives me:
findtestdir: __name__ = __main__
findtestdir: sys.argv[0] = <path to Jython>\dist\Lib\test\regrtest.py
findtestdir: __file__ = <path to Jython>\dist\Lib\test\regrtest.py
findtestdir: os.curdir = .

Finally, in a CPython installation:
findtestdir: __name__ = __main__
findtestdir: sys.argv[0] = <path to Python 2.7>\lib\test\regrtest.py
findtestdir: __file__ = <path to Python 2.7>\lib\test\regrtest.py
findtestdir: os.curdir = .

These are all run with -m test.regrtest .

I will fix regrtest by copying in the lib-python definition of findtestdir, which is shorter anyway and doesn't use sys.argv. However, something is wrong with sys.argv.
History
Date User Action Args
2015-04-19 09:39:37jeff.allensetmessageid: <1429436377.2.0.967423683465.issue2332@psf.upfronthosting.co.za>
2015-04-19 09:39:37jeff.allensetrecipients: + jeff.allen, zyasoft
2015-04-19 09:39:37jeff.allenlinkissue2332 messages
2015-04-19 09:39:36jeff.allencreate