Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"-m unittest --help" says nothing about direct script exection #74264

Closed
IlyaKazakevich mannequin opened this issue Apr 15, 2017 · 7 comments
Closed

"-m unittest --help" says nothing about direct script exection #74264

IlyaKazakevich mannequin opened this issue Apr 15, 2017 · 7 comments
Labels
3.7 (EOL) end of life docs Documentation in the Doc dir type-feature A feature request or enhancement

Comments

@IlyaKazakevich
Copy link
Mannequin

IlyaKazakevich mannequin commented Apr 15, 2017

BPO 30078
Nosy @rbtcollins, @ezio-melotti, @bitdancer, @voidspace, @berkerpeksag, @mlouielu
PRs
  • bpo-30078: Add example for run tests by filename #1178
  • [3.6] bpo-30078: Add an example of passing a path to unittest (GH-1178) #1202
  • [3.5] bpo-30078: Add an example of passing a path to unittest (GH-1178) #1203
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2017-04-20.04:37:46.581>
    created_at = <Date 2017-04-15.20:49:45.321>
    labels = ['type-feature', '3.7', 'docs']
    title = '"-m unittest --help" says nothing about direct script exection'
    updated_at = <Date 2017-04-20.04:37:46.580>
    user = 'https://bugs.python.org/IlyaKazakevich'

    bugs.python.org fields:

    activity = <Date 2017-04-20.04:37:46.580>
    actor = 'berker.peksag'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2017-04-20.04:37:46.581>
    closer = 'berker.peksag'
    components = ['Documentation']
    creation = <Date 2017-04-15.20:49:45.321>
    creator = 'Ilya Kazakevich'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 30078
    keywords = []
    message_count = 7.0
    messages = ['291729', '291730', '291886', '291936', '291942', '291943', '291944']
    nosy_count = 8.0
    nosy_names = ['rbcollins', 'ezio.melotti', 'r.david.murray', 'michael.foord', 'docs@python', 'berker.peksag', 'louielu', 'Ilya Kazakevich']
    pr_nums = ['1178', '1202', '1203']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue30078'
    versions = ['Python 3.5', 'Python 3.6', 'Python 3.7']

    @IlyaKazakevich
    Copy link
    Mannequin Author

    IlyaKazakevich mannequin commented Apr 15, 2017

    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.

    @IlyaKazakevich IlyaKazakevich mannequin added the docs Documentation in the Doc dir label Apr 15, 2017
    @bitdancer
    Copy link
    Member

    Agreed that it looks like another example line should be added to the help for this case.

    @bitdancer bitdancer added the 3.7 (EOL) end of life label Apr 15, 2017
    @mlouielu
    Copy link
    Mannequin

    mlouielu mannequin commented Apr 19, 2017

    Add a simple line to MAIN_EXAMPLES:

    "%(prog)s path/to/test_file.py - run tests from test_file.py"

    @berkerpeksag
    Copy link
    Member

    New changeset f7e62cf by Berker Peksag (Louie Lu) in branch 'master':
    bpo-30078: Add an example of passing a path to unittest (bpo-1178)
    f7e62cf

    @berkerpeksag
    Copy link
    Member

    New changeset 596e714 by Berker Peksag in branch '3.6':
    bpo-30078: Add an example of passing a path to unittest (GH-1178)
    596e714

    @berkerpeksag
    Copy link
    Member

    New changeset 6fb0f80 by Berker Peksag in branch '3.5':
    bpo-30078: Add an example of passing a path to unittest (GH-1178)
    6fb0f80

    @berkerpeksag
    Copy link
    Member

    Thanks!

    @berkerpeksag berkerpeksag added the type-feature A feature request or enhancement label Apr 20, 2017
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life docs Documentation in the Doc dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants