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

Add tests for CLI of the tabnanny module #63301

Closed
berkerpeksag opened this issue Sep 27, 2013 · 6 comments
Closed

Add tests for CLI of the tabnanny module #63301

berkerpeksag opened this issue Sep 27, 2013 · 6 comments
Assignees
Labels
tests Tests in the Lib/test dir type-feature A feature request or enhancement

Comments

@berkerpeksag
Copy link
Member

BPO 19102
Nosy @vstinner, @berkerpeksag, @serhiy-storchaka, @ultimatecoder
PRs
  • gh-63301: Set exit code when tabnanny CLI exits on error #7699
  • Files
  • test_tabnanny.diff
  • 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 = 'https://github.com/berkerpeksag'
    closed_at = None
    created_at = <Date 2013-09-27.11:41:08.119>
    labels = ['type-feature', 'tests']
    title = 'Add tests for CLI of the tabnanny module'
    updated_at = <Date 2018-06-15.04:34:31.033>
    user = 'https://github.com/berkerpeksag'

    bugs.python.org fields:

    activity = <Date 2018-06-15.04:34:31.033>
    actor = 'jaysinh.shukla'
    assignee = 'berker.peksag'
    closed = False
    closed_date = None
    closer = None
    components = ['Tests']
    creation = <Date 2013-09-27.11:41:08.119>
    creator = 'berker.peksag'
    dependencies = []
    files = ['31882']
    hgrepos = []
    issue_num = 19102
    keywords = ['patch']
    message_count = 6.0
    messages = ['198467', '230733', '233642', '319502', '319503', '319584']
    nosy_count = 5.0
    nosy_names = ['vstinner', 'berker.peksag', 'Al.Sweigart', 'serhiy.storchaka', 'jaysinh.shukla']
    pr_nums = ['7699']
    priority = 'low'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue19102'
    versions = ['Python 3.5']

    @berkerpeksag
    Copy link
    Member Author

    I was trying to use the argparse module instead of getopt and I couldn't find any tests for CLI of the tabnanny module.

    @berkerpeksag berkerpeksag added the tests Tests in the Lib/test dir label Sep 27, 2013
    @serhiy-storchaka
    Copy link
    Member

    Added comments on Rietveld.

    Although tabnanny is located in the Lib directory, not in the Tools directory, technically it is a script. May be move test_tabnanny.py to Lib/test/test_tools?

    @serhiy-storchaka serhiy-storchaka added the type-feature A feature request or enhancement label Nov 6, 2014
    @AlSweigart
    Copy link
    Mannequin

    AlSweigart mannequin commented Jan 8, 2015

    Since tabnanny is also a module in the standard library (it is imported by the idle code), wouldn't moving it to lib/test/test_tools make it un-importable? This would be a good case for leaving it where it is.

    @vstinner
    Copy link
    Member

    New changeset dfa9643 by Victor Stinner (Jaysinh Shukla) in branch 'master':
    bpo-19382: Adding test cases for module tabnanny (GH-851)
    dfa9643

    --

    @Jaysinh Shukla: I looked at Berker's old patch, and I think that it would be interesting to modify tabnanny to return with a non-zero exit code in case of failure. Maybe replace "return" with "sys.exit(1)" after errprint() calls.

    @ultimatecoder
    Copy link
    Mannequin

    ultimatecoder mannequin commented Jun 14, 2018

    @Stinner Victor Thanks for merging. I will try to observe that patch and will update you here. Have a great day

    @ultimatecoder
    Copy link
    Mannequin

    ultimatecoder mannequin commented Jun 15, 2018

    @vstinner I have created the PR here. I wasn't sure so linked the PR with this issue. Thanks!

    PR URL: #7699

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    hauntsaninja pushed a commit that referenced this issue Mar 4, 2023
    hugovk pushed a commit to hugovk/cpython that referenced this issue Mar 6, 2023
    carljm added a commit to carljm/cpython that referenced this issue Mar 6, 2023
    * main: (21 commits)
      pythongh-102192: Replace PyErr_Fetch/Restore etc by more efficient alternatives in sub interpreters module (python#102472)
      pythongh-95672: Fix versionadded indentation of get_pagesize in test.rst (pythongh-102455)
      pythongh-102416: Do not memoize incorrectly loop rules in the parser (python#102467)
      pythonGH-101362: Optimise PurePath(PurePath(...)) (pythonGH-101667)
      pythonGH-101362: Check pathlib.Path flavour compatibility at import time (pythonGH-101664)
      pythonGH-101362: Call join() only when >1 argument supplied to pathlib.PurePath() (python#101665)
      pythongh-102444: Fix minor bugs in `test_typing` highlighted by pyflakes (python#102445)
      pythonGH-102341: Improve the test function for pow (python#102342)
      Fix unused classes in a typing test (pythonGH-102437)
      pythongh-101979: argparse: fix a bug where parentheses in metavar argument of add_argument() were dropped (python#102318)
      pythongh-102356: Add thrashcan macros to filter object dealloc (python#102426)
      Move around example in to_bytes() to avoid confusion (python#101595)
      pythonGH-97546: fix flaky asyncio `test_wait_for_race_condition` test (python#102421)
      pythongh-96821: Add config option `--with-strict-overflow` (python#96823)
      pythongh-101992: update pstlib module documentation (python#102133)
      pythongh-63301: Set exit code when tabnanny CLI exits on error (python#7699)
      pythongh-101863: Fix wrong comments in EUC-KR codec (pythongh-102417)
      pythongh-102302 Micro-optimize `inspect.Parameter.__hash__` (python#102303)
      pythongh-102179: Fix `os.dup2` error reporting for negative fds (python#102180)
      pythongh-101892: Fix `SystemError` when a callable iterator call exhausts the iterator (python#101896)
      ...
    carljm added a commit to carljm/cpython that referenced this issue Mar 7, 2023
    * main: (37 commits)
      pythongh-102192: Replace PyErr_Fetch/Restore etc by more efficient alternatives in sub interpreters module (python#102472)
      pythongh-95672: Fix versionadded indentation of get_pagesize in test.rst (pythongh-102455)
      pythongh-102416: Do not memoize incorrectly loop rules in the parser (python#102467)
      pythonGH-101362: Optimise PurePath(PurePath(...)) (pythonGH-101667)
      pythonGH-101362: Check pathlib.Path flavour compatibility at import time (pythonGH-101664)
      pythonGH-101362: Call join() only when >1 argument supplied to pathlib.PurePath() (python#101665)
      pythongh-102444: Fix minor bugs in `test_typing` highlighted by pyflakes (python#102445)
      pythonGH-102341: Improve the test function for pow (python#102342)
      Fix unused classes in a typing test (pythonGH-102437)
      pythongh-101979: argparse: fix a bug where parentheses in metavar argument of add_argument() were dropped (python#102318)
      pythongh-102356: Add thrashcan macros to filter object dealloc (python#102426)
      Move around example in to_bytes() to avoid confusion (python#101595)
      pythonGH-97546: fix flaky asyncio `test_wait_for_race_condition` test (python#102421)
      pythongh-96821: Add config option `--with-strict-overflow` (python#96823)
      pythongh-101992: update pstlib module documentation (python#102133)
      pythongh-63301: Set exit code when tabnanny CLI exits on error (python#7699)
      pythongh-101863: Fix wrong comments in EUC-KR codec (pythongh-102417)
      pythongh-102302 Micro-optimize `inspect.Parameter.__hash__` (python#102303)
      pythongh-102179: Fix `os.dup2` error reporting for negative fds (python#102180)
      pythongh-101892: Fix `SystemError` when a callable iterator call exhausts the iterator (python#101896)
      ...
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    tests Tests in the Lib/test dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants