Skip to content

`poetry lock' breaks tests for poetry itself #3404

@hexchain

Description

@hexchain

Issue

In the poetry repository, if I run poetry lock before poetry install and poetry run pytest tests, some tests fail:

Results (39.02s):
     604 passed
      35 failed
         - tests/console/commands/test_publish.py:9 test_publish_returns_non_zero_code_for_upload_errors
         - tests/console/commands/test_publish.py:33 test_publish_returns_non_zero_code_for_connection_errors
         - tests/console/commands/test_search.py:23 test_search
         - tests/installation/test_authenticator.py:19 test_authenticator_uses_url_provided_credentials
         - tests/installation/test_authenticator.py:35 test_authenticator_uses_credentials_from_config_if_not_provided
         - tests/installation/test_authenticator.py:53 test_authenticator_uses_username_only_credentials
         - tests/installation/test_authenticator.py:69 test_authenticator_uses_password_only_credentials
         - tests/installation/test_authenticator.py:85 test_authenticator_uses_empty_strings_as_default_password
         - tests/installation/test_authenticator.py:103 test_authenticator_uses_empty_strings_as_default_username
         - tests/installation/test_authenticator.py:121 test_authenticator_request_retries_on_exception
         - tests/installation/test_authenticator.py:141 test_authenticator_request_raises_exception_when_attempts_exhausted
         - tests/installation/test_authenticator.py:159 test_authenticator_request_retries_on_status_code[400-0]
         - tests/installation/test_authenticator.py:159 test_authenticator_request_retries_on_status_code[401-0]
         - tests/installation/test_authenticator.py:159 test_authenticator_request_retries_on_status_code[403-0]
         - tests/installation/test_authenticator.py:159 test_authenticator_request_retries_on_status_code[404-0]
         - tests/installation/test_authenticator.py:159 test_authenticator_request_retries_on_status_code[500-0]
         - tests/installation/test_authenticator.py:159 test_authenticator_request_retries_on_status_code[502-5]
         - tests/installation/test_authenticator.py:159 test_authenticator_request_retries_on_status_code[503-5]
         - tests/installation/test_authenticator.py:159 test_authenticator_request_retries_on_status_code[504-5]
         - tests/installation/test_authenticator.py:191 test_authenticator_uses_env_provided_credentials
         - tests/installation/test_chooser.py:84 test_chooser_chooses_universal_wheel_link_if_available[]
         - tests/installation/test_chooser.py:84 test_chooser_chooses_universal_wheel_link_if_available[legacy]
         - tests/installation/test_chooser.py:105 test_chooser_chooses_specific_python_universal_wheel_link_if_available[]
         - tests/installation/test_chooser.py:105 test_chooser_chooses_specific_python_universal_wheel_link_if_available[legacy]
         - tests/installation/test_chooser.py:126 test_chooser_chooses_system_specific_wheel_link_if_available[]
         - tests/installation/test_chooser.py:126 test_chooser_chooses_system_specific_wheel_link_if_available[legacy]
         - tests/installation/test_chooser.py:150 test_chooser_chooses_sdist_if_no_compatible_wheel_link_is_available[]
         - tests/installation/test_chooser.py:150 test_chooser_chooses_sdist_if_no_compatible_wheel_link_is_available[legacy]
         - tests/installation/test_chooser.py:171 test_chooser_chooses_distributions_that_match_the_package_hashes[]
         - tests/installation/test_chooser.py:171 test_chooser_chooses_distributions_that_match_the_package_hashes[legacy]
         - tests/installation/test_executor.py:66 test_execute_executes_a_batch_of_operations
         - tests/publishing/test_uploader.py:17 test_uploader_properly_handles_400_errors
         - tests/publishing/test_uploader.py:27 test_uploader_properly_handles_403_errors
         - tests/publishing/test_uploader.py:37 test_uploader_properly_handles_301_redirects
         - tests/publishing/test_uploader.py:49 test_uploader_registers_for_appropriate_400_errors
       4 skipped

Downgrading urllib3 to 1.25.10, or pinning requests to 2.24.*, fixes the issue. It seems that httpretty is not compatible with urllib3>=1.26.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/testingRelated to the test suite

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions