Skip to content

Commit

Permalink
Upgrade cleo and clikit to the latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
sdispater committed Mar 27, 2020
1 parent 3b30d2a commit a34a6da
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 11 deletions.
33 changes: 25 additions & 8 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ classifiers = [
[tool.poetry.dependencies]
python = "~2.7 || ^3.5"
poetry-core = "^1.0.0a5"
cleo = "^0.7.6"
clikit = "^0.4.3"
cleo = "^0.8.0"
clikit = "^0.5.1"
requests = "^2.18"
cachy = "^0.3.0"
requests-toolbelt = "^0.8.0"
Expand Down
35 changes: 34 additions & 1 deletion tests/console/commands/test_publish.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import pytest

from poetry.utils._compat import PY36
from poetry.utils._compat import Path


@pytest.mark.skipif(
not PY36, reason="Improved error rendering is only available on Python >=3.6"
)
def test_publish_returns_non_zero_code_for_upload_errors(app, app_tester, http):
http.register_uri(
http.POST, "https://upload.pypi.org/legacy/", status=400, body="Bad Request"
Expand All @@ -14,7 +20,34 @@ def test_publish_returns_non_zero_code_for_upload_errors(app, app_tester, http):
Publishing simple-project (1.2.3) to PyPI
[UploadError]
UploadError
HTTP Error 400: Bad Request
"""

assert expected in app_tester.io.fetch_output()


@pytest.mark.skipif(
PY36, reason="Improved error rendering is not available on Python <3.6"
)
def test_publish_returns_non_zero_code_for_upload_errors_older_python(
app, app_tester, http
):
http.register_uri(
http.POST, "https://upload.pypi.org/legacy/", status=400, body="Bad Request"
)

exit_code = app_tester.execute("publish --username foo --password bar")

assert 1 == exit_code

expected = """
Publishing simple-project (1.2.3) to PyPI
UploadError
HTTP Error 400: Bad Request
"""

Expand Down

0 comments on commit a34a6da

Please sign in to comment.