[issue8332] regrtest single TestClass/test_method

2010-11-12 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

Yes. You're missing the second case. In:
 regrtest [options] test_file.test_method

You don't specify class name. This saves some time you need to navigate and 
copy/paste name of container class. It will save more time if masks are used by 
default. To illustrate this let's introduce '-l' key that lists all found tests 
to test test discovery (no errors in this sentence).

 regrtest -l *des*
test_file.FancyRenameTests.test_no_*des*t_exists
test_file.FancyRenameTests.test_*des*t_exists
test_file.FancyRenameTests.test_*des*t_opened
test_file.GitFile*des*tTests.test_invalid
test_file.GitFile*des*tTests.test_readonly
test_*des*t.SomeClass.some_test


*stars* in results highlight matched substring.

Rationale: The most common operation when looking for tests to run is grep. You 
don't need to remember option name to specify mask - just use mask - it will 
run discovery and execute only tests found. '-l' key in test runner can be used 
to quickly grep available tests to find the exact name and run only it.

--
status: closed - open

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8332
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8332] regrtest single TestClass/test_method

2010-11-12 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

I'm -1 on your second case.  That syntax is too magical, especially since a 
test method can appear on more than one test case.  

The additional pattern matching suggestion is more interesting, but it would be 
necessary to implement that in unittest, since test classes and methods can be 
created on the fly. I suggest opening a new issue against unittest to extend 
pattern matching to test case and test method names if you think that feature 
is valuable enough to add.

I agree with Sandro, I think the valid part of this request is satisfied by the 
unittest CLI.  It is true that more work needs to be done before all Python 
tests can be run successfully in this fashion, since some depend on regrtest 
features.  But making those fixes (moving useful regrtest features to unittest 
and eliminating the non-useful regrtest dependencies) is a better investment of 
resources than adding run-single-test support directly to regrtest, IMO.

If you want to submit a patch for first case, though, feel free to reopen this. 
 I doubt we'd reject it if you want to do the work.

--
nosy: +r.david.murray
resolution: fixed - works for me
stage:  - committed/rejected
status: open - closed
versions: +Python 3.2 -Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8332
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8332] regrtest single TestClass/test_method

2010-10-28 Thread Sandro Tosi

Sandro Tosi sandro.t...@gmail.com added the comment:

Hello,
as explained in msg108109 (of issue9028) you can actually call a single test, 
or a single TestClass:

$ ./python -m unittest test.test_httpservers.BaseHTTPServerTestCase.test_handler
.
--
Ran 1 test in 0.168s

OK
$ ./python -m unittest test.test_httpservers.BaseHTTPServerTestCase
..
--
Ran 14 tests in 1.132s

OK

I'm closing this report, but feel free to reopen it if you think I'm missing 
something.

Thanks,
Sandro

--
nosy: +sandro.tosi
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8332
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8332] regrtest single TestClass/test_method

2010-04-07 Thread anatoly techtonik

New submission from anatoly techtonik techto...@gmail.com:

It would be convenient for debug to execute single test_method or TestClass. 
Running all tests in file can take a long time.

--
components: Tests
messages: 102524
nosy: techtonik
severity: normal
status: open
title: regrtest single TestClass/test_method
type: feature request
versions: Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8332
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8332] regrtest single TestClass/test_method

2010-04-07 Thread anatoly techtonik

anatoly techtonik techto...@gmail.com added the comment:

regrtest [options] test_file.TestClass
regrtest [options] test_file.test_method

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8332
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com