summaryrefslogtreecommitdiff
path: root/tests/functional/test_vcs_bazaar.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/test_vcs_bazaar.py')
-rw-r--r--tests/functional/test_vcs_bazaar.py22
1 files changed, 12 insertions, 10 deletions
diff --git a/tests/functional/test_vcs_bazaar.py b/tests/functional/test_vcs_bazaar.py
index 0e598382a..63955d6e7 100644
--- a/tests/functional/test_vcs_bazaar.py
+++ b/tests/functional/test_vcs_bazaar.py
@@ -3,29 +3,31 @@ Contains functional tests of the Bazaar class.
"""
import os
+import sys
+from pathlib import Path
import pytest
from pip._internal.vcs.bazaar import Bazaar
from pip._internal.vcs.versioncontrol import RemoteNotFoundError
-from tests.lib import is_bzr_installed, need_bzr
+from tests.lib import PipTestEnvironment, is_bzr_installed, need_bzr
@pytest.mark.skipif(
- 'TRAVIS' not in os.environ,
- reason='Bazaar is only required under Travis')
-def test_ensure_bzr_available():
- """Make sure that bzr is available when running in Travis."""
+ sys.platform == "win32" or "CI" not in os.environ,
+ reason="Bazaar is only required under CI",
+)
+def test_ensure_bzr_available() -> None:
+ """Make sure that bzr is available when running in CI."""
assert is_bzr_installed()
@need_bzr
-def test_get_remote_url__no_remote(script, tmpdir):
- repo_dir = tmpdir / 'temp-repo'
+def test_get_remote_url__no_remote(script: PipTestEnvironment, tmpdir: Path) -> None:
+ repo_dir = tmpdir / "temp-repo"
repo_dir.mkdir()
- repo_dir = str(repo_dir)
- script.run('bzr', 'init', repo_dir)
+ script.run("bzr", "init", os.fspath(repo_dir))
with pytest.raises(RemoteNotFoundError):
- Bazaar().get_remote_url(repo_dir)
+ Bazaar().get_remote_url(os.fspath(repo_dir))