Re: [Python-Dev] Does trace modules have a unit test?

2010-07-25 Thread Alexander Belopolsky
On Sat, Jul 24, 2010 at 11:18 PM, Nick Coghlan ncogh...@gmail.com wrote: On Sun, Jul 25, 2010 at 2:20 AM, Alexander Belopolsky alexander.belopol...@gmail.com wrote: .. Step 1: Rename test_trace to test_sys_settrace and test_profilehooks to test_sys_setprofile. .. A tracetester helper module +

Re: [Python-Dev] Does trace modules have a unit test?

2010-07-25 Thread Nick Coghlan
On Mon, Jul 26, 2010 at 1:50 AM, Alexander Belopolsky alexander.belopol...@gmail.com wrote: On Sat, Jul 24, 2010 at 11:18 PM, Nick Coghlan ncogh...@gmail.com wrote: On Sun, Jul 25, 2010 at 2:20 AM, Alexander Belopolsky alexander.belopol...@gmail.com wrote: .. Step 1: Rename test_trace to

Re: [Python-Dev] Does trace modules have a unit test?

2010-07-25 Thread Alexander Belopolsky
On Sun, Jul 25, 2010 at 5:57 PM, Nick Coghlan ncogh...@gmail.com wrote: .. While the general preference is to backport tests, it is also acknowledged that that can become overly difficult as the test cases diverge. Up to you if you want to manually fix your patch for 3.1, drop the

Re: [Python-Dev] Does trace modules have a unit test?

2010-07-24 Thread Alexander Belopolsky
On Thu, Jul 22, 2010 at 6:33 PM, Nick Coghlan ncogh...@gmail.com wrote: On Fri, Jul 23, 2010 at 3:30 AM, Alexander Belopolsky alexander.belopol...@gmail.com wrote: I see three solutions: 1.  Minimal:  do not rename test_trace in 2.7 and add trace module tests to the existing file.  Whether

Re: [Python-Dev] Does trace modules have a unit test?

2010-07-24 Thread Nick Coghlan
On Sun, Jul 25, 2010 at 2:20 AM, Alexander Belopolsky alexander.belopol...@gmail.com wrote: I would like to use this opportunity to merge settrace and setprofile tests.  Here is the proposal: Step 1: Rename test_trace to test_sys_settrace and test_profilehooks to test_sys_setprofile. Step 2:

Re: [Python-Dev] Does trace modules have a unit test?

2010-07-22 Thread Alexander Belopolsky
On Wed, Jul 21, 2010 at 9:26 PM, Steve Holden st...@holdenweb.com wrote: On 7/21/2010 6:45 PM, Alexander Belopolsky wrote: On Wed, Jul 21, 2010 at 1:42 PM, Benjamin Peterson benja...@python.org wrote: .. True, but the tests in that file are (mostly?) all about line tracing. Hopefully this

Re: [Python-Dev] Does trace modules have a unit test?

2010-07-22 Thread Nick Coghlan
On Fri, Jul 23, 2010 at 3:30 AM, Alexander Belopolsky alexander.belopol...@gmail.com wrote: I see three solutions: 1.  Minimal:  do not rename test_trace in 2.7 and add trace module tests to the existing file.  Whether to revert test_trace to test_line_tracing renaming in 3.2 can be decided

Re: [Python-Dev] Does trace modules have a unit test?

2010-07-21 Thread Alexander Belopolsky
On Tue, Jul 20, 2010 at 6:19 PM, Nick Coghlan ncogh...@gmail.com wrote: .. Yep, we're pretty free to rename stuff as required inside the test suite. The only real exception is test.support, as that's a documented standard library module. Would anyone object to moving Lib/test/test_trace.py to

Re: [Python-Dev] Does trace modules have a unit test?

2010-07-21 Thread Benjamin Peterson
2010/7/21 Alexander Belopolsky alexander.belopol...@gmail.com: On Tue, Jul 20, 2010 at 6:19 PM, Nick Coghlan ncogh...@gmail.com wrote: .. Yep, we're pretty free to rename stuff as required inside the test suite. The only real exception is test.support, as that's a documented standard library

Re: [Python-Dev] Does trace modules have a unit test?

2010-07-21 Thread Alexander Belopolsky
On Wed, Jul 21, 2010 at 1:42 PM, Benjamin Peterson benja...@python.org wrote: .. True, but the tests in that file are (mostly?) all about line tracing. Hopefully this will change soon. :-) ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] Does trace modules have a unit test?

2010-07-21 Thread Steve Holden
On 7/21/2010 6:45 PM, Alexander Belopolsky wrote: On Wed, Jul 21, 2010 at 1:42 PM, Benjamin Peterson benja...@python.org wrote: .. True, but the tests in that file are (mostly?) all about line tracing. Hopefully this will change soon. :-) At which point the renaming would be justified.

Re: [Python-Dev] Does trace modules have a unit test?

2010-07-20 Thread Eli Bendersky
I've opened issue 9315 (http://bugs.python.org/issue9315) to address the lack of unit tests for the trace.py module. I hope to get to it in a few days and add some tests. As Terry wrote in the beginning of this thread, Lib/test/test_trace.py currently tests the sys.settrace module, so the tests

Re: [Python-Dev] Does trace modules have a unit test?

2010-07-20 Thread Reid Kleckner
On Tue, Jul 20, 2010 at 10:51 AM, Eli Bendersky eli...@gmail.com wrote: As Terry wrote in the beginning of this thread, Lib/test/test_trace.py currently tests the sys.settrace module, so the tests of trace.py should find a new home. Does Lib/test/test_trace_module.py make sense or is something

Re: [Python-Dev] Does trace modules have a unit test?

2010-07-20 Thread Alexander Belopolsky
On Tue, Jul 20, 2010 at 2:12 PM, Reid Kleckner reid.kleck...@gmail.com wrote: .. IMO you should just rename test_trace.py to test_settrace.py, and put the trace.py tests in test_trace.py. +1 ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] Does trace modules have a unit test?

2010-07-20 Thread Nick Coghlan
On Wed, Jul 21, 2010 at 4:18 AM, Alexander Belopolsky alexander.belopol...@gmail.com wrote: On Tue, Jul 20, 2010 at 2:12 PM, Reid Kleckner reid.kleck...@gmail.com wrote: .. IMO you should just rename test_trace.py to test_settrace.py, and put the trace.py tests in test_trace.py. +1 Yep,

Re: [Python-Dev] Does trace modules have a unit test?

2010-07-19 Thread Nick Coghlan
On Mon, Jul 19, 2010 at 2:23 PM, Alexander Belopolsky alexander.belopol...@gmail.com wrote: On Mon, Jul 19, 2010 at 12:21 AM, Alexander Belopolsky alexander.belopol...@gmail.com wrote: On Mon, Jul 19, 2010 at 12:12 AM, Eli Bendersky eli...@gmail.com wrote: .. stdout output can be captured,

[Python-Dev] Does trace modules have a unit test?

2010-07-18 Thread Terry Reedy
In reviewing http://bugs.python.org/issue9282 the issue came up, where is the unit test for trace.py? test/test_trace.py is actually a test of the line trace facility of sys.settrace (and should have been called test_linetrace or test_settrace). The only trace import Eli could find in Lib/test

Re: [Python-Dev] Does trace modules have a unit test?

2010-07-18 Thread Eli Bendersky
On Mon, Jul 19, 2010 at 07:02, Terry Reedy tjre...@udel.edu wrote: In reviewing http://bugs.python.org/issue9282 the issue came up, where is the unit test for trace.py? test/test_trace.py is actually a test of the line trace facility of sys.settrace (and should have been called

Re: [Python-Dev] Does trace modules have a unit test?

2010-07-18 Thread Alexander Belopolsky
On Mon, Jul 19, 2010 at 12:12 AM, Eli Bendersky eli...@gmail.com wrote: .. stdout output can be captured, but what about the .cover files? Can a Python unit test create temporary files in tmp/ (or somewhere else) as part of its testing, or is this forbidden? That's perfectly fine. Grep in

Re: [Python-Dev] Does trace modules have a unit test?

2010-07-18 Thread Alexander Belopolsky
On Mon, Jul 19, 2010 at 12:21 AM, Alexander Belopolsky alexander.belopol...@gmail.com wrote: On Mon, Jul 19, 2010 at 12:12 AM, Eli Bendersky eli...@gmail.com wrote: .. stdout output can be captured, but what about the .cover files? Can a Python unit test create temporary files in tmp/ (or