Skip to content

Removed unused verification of supported commands#101

Merged
sigmavirus24 merged 4 commits intopypa:masterfrom
rodcloutier:Removed_unused_code_in_cli
Apr 14, 2015
Merged

Removed unused verification of supported commands#101
sigmavirus24 merged 4 commits intopypa:masterfrom
rodcloutier:Removed_unused_code_in_cli

Conversation

@rodcloutier
Copy link
Copy Markdown
Contributor

I noticed that the cli.py module coverage was not reported as complete the but the tests seemed to be fine, testing all cases. I noticed that a verification of supported commands was hit by the tests hence the tests succeeding but the coverage not full.

I removed the verification code since the command option uses a choice which will report any unsupported commands.

Test run before

$ tox -e py27 --develop
py27 develop-inst-noop: /Users/rod/dev/external/twine
py27 runtests: PYTHONHASHSEED='992522251'
py27 runtests: commands[0] | coverage run --source twine -m pytest tests
========================================================= test session starts =========================================================
platform darwin -- Python 2.7.6 -- py-1.4.26 -- pytest-2.7.0
rootdir: /Users/rod/dev/external/twine, inifile:
collected 15 items

tests/test_cli.py ..
tests/test_upload.py .....
tests/test_utils.py ........

====================================================== 15 passed in 0.30 seconds ======================================================
py27 runtests: commands[1] | coverage report -m
Name                      Stmts   Miss Branch BrMiss  Cover   Missing
---------------------------------------------------------------------
twine/__init__               11      0      0      0   100%
twine/cli                    27      2      4      2    87%   67-68
twine/commands/__init__       2      0      0      0   100%
twine/commands/upload       103     66     34     26    33%   26-27, 84-218, 222-275
twine/utils                  45      1     27      2    96%   29
twine/wheel                  47     30      8      8    31%   23-24, 44-46, 50-51, 54-78, 81-85
twine/wininst                37     26     10     10    23%   16-18, 22-26, 29-54
---------------------------------------------------------------------
TOTAL                       272    125     83     48    51%
_______________________________________________________________ summary _______________________________________________________________
  py27: commands succeeded
  congratulations :)

Test run after

 $ tox -e py27 --develop
py27 develop-inst-noop: /Users/rod/dev/external/twine
py27 runtests: PYTHONHASHSEED='1904517968'
py27 runtests: commands[0] | coverage run --source twine -m pytest tests
========================================================= test session starts =========================================================
platform darwin -- Python 2.7.6 -- py-1.4.26 -- pytest-2.7.0
rootdir: /Users/rod/dev/external/twine, inifile:
collected 15 items

tests/test_cli.py ..
tests/test_upload.py .....
tests/test_utils.py ........

====================================================== 15 passed in 0.30 seconds ======================================================
py27 runtests: commands[1] | coverage report -m
Name                      Stmts   Miss Branch BrMiss  Cover   Missing
---------------------------------------------------------------------
twine/__init__               11      0      0      0   100%
twine/cli                    22      0      2      0   100%
twine/commands/__init__       2      0      0      0   100%
twine/commands/upload       103     66     34     26    33%   26-27, 84-218, 222-275
twine/utils                  45      1     27      2    96%   29
twine/wheel                  47     30      8      8    31%   23-24, 44-46, 50-51, 54-78, 81-85
twine/wininst                37     26     10     10    23%   16-18, 22-26, 29-54
---------------------------------------------------------------------
TOTAL                       267    123     81     46    51%
_______________________________________________________________ summary _______________________________________________________________
  py27: commands succeeded
  congratulations :)

@sigmavirus24
Copy link
Copy Markdown
Member

LGTM. Thanks @rodcloutier

sigmavirus24 added a commit that referenced this pull request Apr 14, 2015
Removed unused verification of supported commands
@sigmavirus24 sigmavirus24 merged commit 8f5a85e into pypa:master Apr 14, 2015
@sigmavirus24 sigmavirus24 modified the milestone: next Sep 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants