[issue30078] "-m unittest --help" says nothing about direct script exection
New submission from Ilya Kazakevich: In Py3 it is possible to run test filelike "python -m unittest tests/test_something.py" (it is *not* possible in Py2!) Here is doc: https://docs.python.org/3/library/unittest.html But "--help" seems to be simply copied from Py2 because it does not have information nor examples about such execution. Please add it to "examples" section at least because this type of usage is very useful. ---------- assignee: docs@python components: Documentation messages: 291729 nosy: Ilya Kazakevich, docs@python priority: normal severity: normal status: open title: "-m unittest --help" says nothing about direct script exection versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue30078> _______________________________________
R. David Murray added the comment: Agreed that it looks like another example line should be added to the help for this case. ---------- nosy: +r.david.murray stage: -> needs patch versions: +Python 3.7 -Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue30078> _______________________________________
Changes by Louie Lu <me@louie.lu>: ---------- pull_requests: +1306 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue30078> _______________________________________
Louie Lu added the comment: Add a simple line to `MAIN_EXAMPLES`: "%(prog)s path/to/test_file.py - run tests from test_file.py" ---------- nosy: +louielu _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue30078> _______________________________________
Changes by Serhiy Storchaka <storchaka+cpython@gmail.com>: ---------- nosy: +ezio.melotti, michael.foord, rbcollins stage: needs patch -> patch review _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue30078> _______________________________________
Berker Peksag added the comment: New changeset f7e62cf8adfb8ab6a6a870903defe8ff218a0383 by Berker Peksag (Louie Lu) in branch 'master': bpo-30078: Add an example of passing a path to unittest (#1178) https://github.com/python/cpython/commit/f7e62cf8adfb8ab6a6a870903defe8ff218... ---------- nosy: +berker.peksag _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue30078> _______________________________________
Changes by Berker Peksag <berker.peksag@gmail.com>: ---------- pull_requests: +1327 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue30078> _______________________________________
Changes by Berker Peksag <berker.peksag@gmail.com>: ---------- pull_requests: +1328 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue30078> _______________________________________
Berker Peksag added the comment: New changeset 596e714d79a22d1d53f26ae1a579dcd43f15865a by Berker Peksag in branch '3.6': bpo-30078: Add an example of passing a path to unittest (GH-1178) https://github.com/python/cpython/commit/596e714d79a22d1d53f26ae1a579dcd43f1... ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue30078> _______________________________________
Berker Peksag added the comment: New changeset 6fb0f801d73b1e2794888772d016d978eccf52a6 by Berker Peksag in branch '3.5': bpo-30078: Add an example of passing a path to unittest (GH-1178) https://github.com/python/cpython/commit/6fb0f801d73b1e2794888772d016d978ecc... ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue30078> _______________________________________
Berker Peksag added the comment: Thanks! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement versions: +Python 3.5 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue30078> _______________________________________
participants (5)
-
Berker Peksag
-
Ilya Kazakevich
-
Louie Lu
-
R. David Murray
-
Serhiy Storchaka