Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add requires_internet mark to additional tests #171

Merged
merged 1 commit into from
Mar 22, 2022

Conversation

musicinmybrain
Copy link
Contributor

In an offline build environment, all of the following tests fail with something like:

E       AssertionError: Creating environment: foo.9000
E         Syncing dependencies
E         
E       assert 1 == 0
E        +  where 1 = <Result SystemExit(1)>.exit_code

/builddir/build/BUILD/hatch-hatch-v1.0.0rc16/tests/cli/env/test_remove.py:181: AssertionError
----------------------------- Captured stderr call -----------------------------
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f629447d990>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/pytest/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f629447c640>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/pytest/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f629447c850>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/pytest/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f629447ffd0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/pytest/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f629447ded0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/pytest/
ERROR: Could not find a version that satisfies the requirement pytest (from versions: none)
ERROR: No matching distribution found for pytest

which implies that these tests need to install wheels from PyPI.

FAILED tests/cli/env/test_create.py::test_post_install_commands - AssertionEr...
FAILED tests/cli/env/test_create.py::test_features - AssertionError: Creating...
FAILED tests/cli/env/test_create.py::test_post_install_commands_error - asser...
FAILED tests/cli/env/test_create.py::test_sync_dependencies - AssertionError:...
FAILED tests/cli/env/test_create.py::test_install_project_no_dev_mode - Asser...
FAILED tests/cli/env/test_create.py::test_install_project_default_dev_mode - ...
FAILED tests/cli/env/test_create.py::test_pre_install_commands - AssertionErr...
FAILED tests/cli/run/test_run.py::test_sync_dependencies - AssertionError: Sy...
FAILED tests/cli/run/test_run.py::test_scripts_no_environment - AssertionErro...
FAILED tests/cli/env/test_prune.py::test_all - AssertionError: Creating envir...
FAILED tests/cli/build/test_build.py::test_shipped - AssertionError: Setting ...
FAILED tests/cli/build/test_build.py::test_build_dependencies - AssertionErro...
FAILED tests/cli/env/test_remove.py::test_active_override - AssertionError: C...
FAILED tests/cli/env/test_remove.py::test_all - AssertionError: Creating envi...
FAILED tests/cli/env/test_remove.py::test_single - AssertionError: Creating e...
FAILED tests/cli/env/test_remove.py::test_matrix_all - AssertionError: Creati...

Add the @pytest.mark.requires_internet decorator, previously used only for tests/cli/new/test_new.py::test_default_no_license_cache, to these tests.

#120 (comment)

Copy link
Sponsor Collaborator

@ofek ofek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

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