[issue9028] test_support.run_unittest cmdline options and arguments

anatoly techtonik report at bugs.python.org
Sun Jun 20 21:51:50 CEST 2010


anatoly techtonik <techtonik at gmail.com> added the comment:

RDM, running your way will execute test from standard library location of installed Python.

> python -m unittest test.test_httpservers.BaseHTTPServerTestCase.test_handler

But I want to execute test from my own patched copy of test_httpservers.py with whatever python I want. I.e.

> C:\Python27\python.exe Z:\python-cgi-tests\test_httpservers.py ...

I prefer to explicitly specify it in command line to be sure that I execute the right test suite. I also don't feel like typing `-m unittest test.test_httpservers.` each time when there is shell completion, and every decent file manager has keyboard shortcuts for inserting active filename into command line prompt.

You know - I am not a core contributor to maintain a bunch of batch files for all kind of operations, so I am interested to make testing process more intuitive.

I know how "TestCase" and "test_" auto discovery works. The point is to remove the need in extra typing, because test runner can add these suffix/prefixes automatically when parsing command line.

@exarkun: Ok. `.` is fine - `::` was a copy paste from my old PHP test runner.

----------
nosy: +michael.foord, pitrou
status: closed -> open

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9028>
_______________________________________


More information about the Python-bugs-list mailing list