[issue4943] trace.CoverageResults.write_results can't write results file for modules loaded by __path__ manipulation

2009-01-13 Thread Matt McClure

New submission from Matt McClure :

The function trace.CoverageResults.write_results() can't write coverage
results on Windows for modules loaded by using the __path__ feature of
PEP 302.

For example, Bazaar uses the __path__ feature to load plugins from
directories specified by the BZR_PLUGIN_PATH environment variable.

The attached zip file contains a test case.  If it is unpacked so that
tracebug.py is in C:\, it will fail to produce a coverage results file
for C:\tracebug\dir2\hello.py.  Instead it will produce an empty file
named C:\tracebug\out\C .

The bug appears to be that trace.fullmodname() returns
C:.tracebug.dir2.hello .  Since the result contains a colon (:), it
can't be used as the filename of the output file produced by
trace.CoverageResults.write_results().

--
components: Library (Lib)
files: tracebug.zip
messages: 79826
nosy: matthewlmcclure
severity: normal
status: open
title: trace.CoverageResults.write_results can't write results file for modules 
loaded by __path__ manipulation
versions: Python 2.4, Python 2.5, Python 2.6
Added file: http://bugs.python.org/file12734/tracebug.zip

___
Python tracker 
<http://bugs.python.org/issue4943>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4943] trace.CoverageResults.write_results can't write results file for modules loaded by __path__ manipulation

2009-01-13 Thread Matt McClure

Matt McClure  added the comment:

The attached patch replaces the offending colon with a period.

--
keywords: +patch
Added file: http://bugs.python.org/file12735/tracebug.patch

___
Python tracker 
<http://bugs.python.org/issue4943>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11798] Test cases not garbage collected after run

2013-08-04 Thread Matt McClure

Matt McClure added the comment:

Michael Foord  voidspace.org.uk> writes:
> On 2 Aug 2013, at 19:19, Antoine Pitrou  pitrou.net> wrote:
> > The patch is basically ready for commit, except for a possible doc
> > addition, no?
> 
> Looks to be the case, reading the patch it looks fine. I'm currently on
> holiday until Monday. If anyone is motivated to do the docs too and 
> commit that would be great. Otherwise I'll get to it on my return.

It looks like the patch is based on what will become 3.4. Would backporting it 
to 2.7 be feasible?  What's involved in doing so?

I took a crack at the docs. I'm attaching an updated patch.

--
nosy: +matthewlmclure

___
Python tracker 
<http://bugs.python.org/issue11798>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11798] Test cases not garbage collected after run

2013-08-04 Thread Matt McClure

Changes by Matt McClure :


Added file: 
http://bugs.python.org/file31154/11798-20130803-matthewlmcclure.patch

___
Python tracker 
<http://bugs.python.org/issue11798>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11798] Test cases not garbage collected after run

2013-08-27 Thread Matt McClure

Matt McClure added the comment:

Andrew,

I didn't understand your message. Are you asking me to change the patch 
somehow? Or asking Michael to review and apply it?

Best,
Matt

--

___
Python tracker 
<http://bugs.python.org/issue11798>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11798] Test cases not garbage collected after run

2013-08-27 Thread Matt McClure

Matt McClure added the comment:

Andrew,

I signed the agreement as matthewlmcclure and as matthewlmcclure-gmail. Is 
there any way I can merge those two user accounts?

I believe the original patch was Tom Wardill's. I just updated his patch.

--
nosy: +matthewlmcclure

___
Python tracker 
<http://bugs.python.org/issue11798>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11798] Test cases not garbage collected after run

2013-08-28 Thread Matt McClure

Matt McClure added the comment:

This might fix it (untested):

diff -r d748d7020192 Lib/test/test_doctest.py
--- a/Lib/test/test_doctest.py  Sat Aug 03 10:09:25 2013 -0400
+++ b/Lib/test/test_doctest.py  Wed Aug 28 15:35:58 2013 -0400
@@ -2329,6 +2329,8 @@
 
 Now, when we run the test:
 
+  >>> suite = doctest.DocFileSuite('test_doctest.txt',
+  ...  optionflags=doctest.DONT_ACCEPT_BLANKLINE)
   >>> result = suite.run(unittest.TestResult())
   >>> print(result.failures[0][1]) # doctest: +ELLIPSIS
   Traceback ...

--

___
Python tracker 
<http://bugs.python.org/issue11798>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com