Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
The full path *could* be easily passed, but I think we should
address this problem from regrtest.py's side.
I disagree. There may be other scripts that rely on __main__.__file__ being an
absolute path and we cannot
Florent Xicluna florent.xicl...@gmail.com added the comment:
I've made the wrong assumption that test.regrtest.__file__ is always absolute.
Here is a patch which should fix it.
--
nosy: +ezio.melotti
Added file: http://bugs.python.org/file18870/issue9323_regrtest.diff
Florent Xicluna florent.xicl...@gmail.com added the comment:
regrtest fixed with r84776 (3.x) and r84779 (2.7)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9323
___
Eli Bendersky eli...@gmail.com added the comment:
It appears to affect 2.7 as well (probably because of a back-port from py3k to
27-maint in revision 83421).
--
versions: +Python 2.7
___
Python tracker rep...@bugs.python.org
Eli Bendersky eli...@gmail.com added the comment:
Looking at Lib/test/regrtest.py:
if __name__ == '__main__':
# Simplification for findtestdir().
assert __file__ == os.path.abspath(sys.argv[0])
I'm not sure regrtest.py is prepared to be run from trace at all. Note that
this
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
Reopening because I think this fix is responsible for a new problem:
$ ./python.exe -m trace -C. -s -c Lib/test/regrtest.py
Traceback (most recent call last):
...
File Lib/test/regrtest.py, line 1458, in module
New submission from Eli Bendersky eli...@gmail.com:
[This bug was discovered by Alexander Belopolsky, during the work on Issue 9317]
Bug report
**
The attached traceme.py file demonstrates the following problem:
With python 2.7:
$ python2 -m trace -c -s traceme.py
lines cov%
Changes by Eli Bendersky eli...@gmail.com:
--
components: +Library (Lib)
keywords: +patch
Added file: http://bugs.python.org/file18106/issue9323.1.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9323
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
[Copying msg111059 from issue9317]
On Wed, Jul 21, 2010 at 9:45 AM, Eli Bendersky rep...@bugs.python.org wrote:
..
As far as I understand, when you run:
py3d -m trace -C pickle-trace.d -c -m test_pickle.py
The
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
Committed with a minor change. (There is no need to keep the source file open
during the trace run.) See r83035 (r83037 in release31-maint.)
I will open a separate issue to discuss a possible RFE related to msg111074.
10 matches
Mail list logo