Skip to content

Commit

Permalink
Add need_svn decorator for tests which require svn
Browse files Browse the repository at this point in the history
Signed-off-by: Harsh Vardhan <[email protected]>
  • Loading branch information
vharsh committed Oct 15, 2019
1 parent 2f1a419 commit 0e6ac42
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 9 deletions.
3 changes: 2 additions & 1 deletion tests/functional/test_freeze.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
_git_commit,
need_bzr,
need_mercurial,
need_svn,
path_to_url,
)

Expand Down Expand Up @@ -169,7 +170,7 @@ def test_freeze_editable_git_with_no_remote(script, tmpdir, deprecated_python):
_check_output(result.stdout, expected)


@pytest.mark.svn
@need_svn
def test_freeze_svn(script, tmpdir):
"""Test freezing a svn checkout"""

Expand Down
3 changes: 2 additions & 1 deletion tests/functional/test_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
create_test_package_with_setup,
need_bzr,
need_mercurial,
need_svn,
path_to_url,
pyversion,
pyversion_tuple,
Expand Down Expand Up @@ -251,7 +252,7 @@ def test_basic_editable_install(script):
assert not result.files_updated


@pytest.mark.svn
@need_svn
def test_basic_install_editable_from_svn(script):
"""
Test checking out from svn.
Expand Down
3 changes: 2 additions & 1 deletion tests/functional/test_install_reqs.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from tests.lib import (
_create_test_package_with_subdirectory,
need_svn,
path_to_url,
pyversion,
requirements_file,
Expand Down Expand Up @@ -100,7 +101,7 @@ def test_relative_requirements_file(script, data):


@pytest.mark.network
@pytest.mark.svn
@need_svn
def test_multiple_requirements_files(script, tmpdir):
"""
Test installing from multiple nested requirements files.
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/test_install_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import pytest

from tests.lib import pyversion
from tests.lib import need_svn, pyversion
from tests.lib.local_repos import local_checkout


Expand Down Expand Up @@ -41,7 +41,7 @@ def test_reset_env_system_site_packages_usersite(self, script):
assert 'INITools' == project_name, project_name

@pytest.mark.network
@pytest.mark.svn
@need_svn
def test_install_subversion_usersite_editable_with_distribute(
self, script, tmpdir):
"""
Expand Down
9 changes: 7 additions & 2 deletions tests/functional/test_uninstall.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@

from pip._internal.req.constructors import install_req_from_line
from pip._internal.utils.misc import rmtree
from tests.lib import assert_all_changes, create_test_package_with_setup
from tests.lib import (
assert_all_changes,
create_test_package_with_setup,
need_svn,
)
from tests.lib.local_repos import local_checkout, local_repo


Expand Down Expand Up @@ -289,6 +293,7 @@ def test_uninstall_easy_installed_console_scripts(script):


@pytest.mark.network
@need_svn
def test_uninstall_editable_from_svn(script, tmpdir):
"""
Test uninstalling an editable installation from svn.
Expand Down Expand Up @@ -352,7 +357,7 @@ def _test_uninstall_editable_with_source_outside_venv(


@pytest.mark.network
@pytest.mark.svn
@need_svn
def test_uninstall_from_reqs_file(script, tmpdir):
"""
Test uninstall from a requirements file.
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/test_vcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from pip._internal.vcs.mercurial import Mercurial
from pip._internal.vcs.subversion import Subversion
from pip._internal.vcs.versioncontrol import RevOptions, VersionControl
from tests.lib import is_svn_installed, pyversion
from tests.lib import is_svn_installed, need_svn, pyversion

if pyversion >= '3':
VERBOSE_FALSE = False
Expand Down Expand Up @@ -411,7 +411,7 @@ def test_subversion__init_use_interactive(
assert svn.use_interactive == expected


@pytest.mark.svn
@need_svn
def test_subversion__call_vcs_version():
"""
Test Subversion.call_vcs_version() against local ``svn``.
Expand Down

0 comments on commit 0e6ac42

Please sign in to comment.