Skip to content

Commit

Permalink
Fix pypa#3630: Add 'needs_internet' marker to tests missing it
Browse files Browse the repository at this point in the history
  • Loading branch information
GPHemsley committed May 29, 2020
1 parent f640fcb commit 1712386
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions news/3630.trivial.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add ``needs_internet`` marker to tests missing it.
2 changes: 2 additions & 0 deletions tests/integration/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ def test_pipenv_check(PipenvInstance):


@pytest.mark.cli
@pytest.mark.needs_internet
def test_pipenv_clean_pip_no_warnings(PipenvInstance):
with PipenvInstance(chdir=True) as p:
with open('setup.py', 'w') as f:
Expand All @@ -172,6 +173,7 @@ def test_pipenv_clean_pip_no_warnings(PipenvInstance):


@pytest.mark.cli
@pytest.mark.needs_internet
def test_pipenv_clean_pip_warnings(PipenvInstance):
with PipenvInstance(chdir=True) as p:
with open('setup.py', 'w') as f:
Expand Down
1 change: 1 addition & 0 deletions tests/integration/test_install_markers.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ def test_resolver_unique_markers(PipenvInstance):

@flaky
@pytest.mark.project
@pytest.mark.needs_internet
def test_environment_variable_value_does_not_change_hash(PipenvInstance):
with PipenvInstance(chdir=True) as p:
with temp_environ():
Expand Down
2 changes: 2 additions & 0 deletions tests/integration/test_lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,7 @@ def test_lockfile_with_empty_dict(PipenvInstance):
@pytest.mark.lock
@pytest.mark.install
@pytest.mark.skip_lock
@pytest.mark.needs_internet
def test_lock_with_incomplete_source(PipenvInstance):
with PipenvInstance(chdir=True) as p:
with open(p.pipfile_path, 'w') as f:
Expand Down Expand Up @@ -693,6 +694,7 @@ def test_vcs_lock_respects_top_level_pins(PipenvInstance):


@pytest.mark.lock
@pytest.mark.needs_internet
def test_lock_after_update_source_name(PipenvInstance):
with PipenvInstance(chdir=True) as p:
contents = """
Expand Down
4 changes: 4 additions & 0 deletions tests/integration/test_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def test_pipfile_envvar_expansion(PipenvInstance):

@pytest.mark.project
@pytest.mark.sources
@pytest.mark.needs_internet
@pytest.mark.parametrize('lock_first', [True, False])
def test_get_source(PipenvInstance, lock_first):
with PipenvInstance(chdir=True) as p:
Expand Down Expand Up @@ -121,6 +122,7 @@ def test_maintain_file_line_endings(PipenvInstance, newlines):

@pytest.mark.project
@pytest.mark.sources
@pytest.mark.needs_internet
def test_many_indexes(PipenvInstance):
with PipenvInstance(chdir=True) as p:
with open(p.pipfile_path, 'w') as f:
Expand Down Expand Up @@ -171,6 +173,7 @@ def test_include_editable_packages(PipenvInstance, testsroot, pathlib_tmpdir):

@pytest.mark.project
@pytest.mark.virtualenv
@pytest.mark.needs_internet
def test_run_in_virtualenv_with_global_context(PipenvInstance, virtualenv):
with PipenvInstance(chdir=True, venv_root=virtualenv.as_posix(), ignore_virtualenvs=False, venv_in_project=False) as p:
c = delegator_run(
Expand Down Expand Up @@ -209,6 +212,7 @@ def test_run_in_virtualenv_with_global_context(PipenvInstance, virtualenv):

@pytest.mark.project
@pytest.mark.virtualenv
@pytest.mark.needs_internet
def test_run_in_virtualenv(PipenvInstance):
with PipenvInstance(chdir=True) as p:
c = p.pipenv('run pip freeze')
Expand Down
1 change: 1 addition & 0 deletions tests/integration/test_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def test_sync_error_without_lockfile(PipenvInstance):

@pytest.mark.sync
@pytest.mark.lock
@pytest.mark.needs_internet
def test_mirror_lock_sync(PipenvInstance):
with temp_environ(), PipenvInstance(chdir=True) as p:
mirror_url = os.environ.pop('PIPENV_TEST_INDEX', "https://pypi.kennethreitz.org/simple")
Expand Down
1 change: 1 addition & 0 deletions tests/integration/test_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def test_local_path_windows_forward_slash(PipenvInstance):


@pytest.mark.cli
@pytest.mark.needs_internet
def test_pipenv_clean_windows(PipenvInstance):
with PipenvInstance(chdir=True) as p:
c = p.pipenv('install requests')
Expand Down

0 comments on commit 1712386

Please sign in to comment.