From bfc2b66abde0ea58b40b04e183358a91403362a8 Mon Sep 17 00:00:00 2001 From: Vikram Jayanthi Date: Wed, 15 Jul 2020 14:41:44 -0700 Subject: [PATCH 1/2] Log config location --- twine/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/twine/utils.py b/twine/utils.py index ea602368..ecabe44a 100644 --- a/twine/utils.py +++ b/twine/utils.py @@ -61,6 +61,8 @@ def get_config(path: str = "~/.pypirc") -> Dict[str, RepositoryConfig]: # Expand user strings in the path path = os.path.expanduser(path) + logger.info("Config Location: " + path) + # Parse the rc file if os.path.isfile(path): parser.read(path) From 5758261de69eeca494327dba46bf2342e8fe88ea Mon Sep 17 00:00:00 2001 From: Vikram Jayanthi Date: Wed, 15 Jul 2020 17:44:06 -0700 Subject: [PATCH 2/2] Fixed status_code test in test_utils --- tests/test_utils.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/test_utils.py b/tests/test_utils.py index 13fd5ff7..6a14ca4e 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -289,11 +289,10 @@ def test_check_status_code_for_missing_status_code(capsys, repo_url): captured = capsys.readouterr() assert captured.out == "Content received from server:\nForbidden\n" - with pytest.raises(requests.HTTPError): - utils.check_status_code(response, False) - - captured = capsys.readouterr() - assert captured.out == "NOTE: Try --verbose to see response content.\n" + if verbose: + assert "Content received from server:\nForbidden\n" in captured.out + else: + assert captured.out == "NOTE: Try --verbose to see response content.\n" @pytest.mark.parametrize(