Skip to content

Commit

Permalink
Merge pull request #20 from click-contrib/click7
Browse files Browse the repository at this point in the history
Click 7 changes how command names are generated.
  • Loading branch information
geowurster authored Sep 16, 2018
2 parents bb55d96 + 07108e1 commit 4fba917
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 13 deletions.
63 changes: 57 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
venv/
venv2/
venv3/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
Expand All @@ -38,23 +38,74 @@ pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Intellij PyCharm
.idea/
# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ cache:

python:
- 2.7
- 3.3
- 3.4
- 3.5
- 3.6
- pypy
- pypy3

Expand All @@ -18,7 +18,7 @@ install:
- pip install -e .\[dev\]

script:
- py.test tests --cov click_plugins --cov-report term-missing
- pytest tests --cov click_plugins --cov-report term-missing

after_success:
- coveralls
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ Developing
$ git clone https://github.com/click-contrib/click-plugins.git
$ cd click-plugins
$ pip install -e .\[dev\]
$ py.test tests --cov click_plugins --cov-report term-missing
$ pytest tests --cov click_plugins --cov-report term-missing
Changelog
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"via setuptools entry-points.",
extras_require={
'dev': [
'pytest',
'pytest>=3',
'pytest-cov',
'wheel',
'coveralls'
Expand Down
6 changes: 3 additions & 3 deletions tests/test_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,18 +115,18 @@ def sub_cli():

# Same as above but the sub-group has plugins
@with_plugins(plugins=iter_entry_points('_test_click_plugins.test_plugins'))
@good_cli.group()
@good_cli.group(name='sub-cli-plugins')
def sub_cli_plugins():
"""Sub CLI with plugins."""
pass

result = runner.invoke(good_cli, ['sub_cli_plugins'])
result = runner.invoke(good_cli, ['sub-cli-plugins'])
assert result.exit_code is 0
for ep in iter_entry_points('_test_click_plugins.test_plugins'):
assert ep.name in result.output

# Execute one of the sub-group's commands
result = runner.invoke(good_cli, ['sub_cli_plugins', 'cmd1', 'something'])
result = runner.invoke(good_cli, ['sub-cli-plugins', 'cmd1', 'something'])
assert result.exit_code is 0
assert result.output.strip() == 'passed'

Expand Down

0 comments on commit 4fba917

Please sign in to comment.