Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion testing/test_file_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ def inwd(request, wd, monkeypatch):
wd.add_command = "git add ."
wd.commit_command = "git commit -m test-{reason}"
elif request.param == "hg":
wd("hg init")
try:
wd("hg init")
except FileNotFoundError:
pytest.skip("hg executable not found")
wd.add_command = "hg add ."
wd.commit_command = 'hg commit -m test-{reason} -u test -d "0 0"'
(wd.cwd / "file1").touch()
Expand Down
8 changes: 8 additions & 0 deletions testing/test_mercurial.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
from setuptools_scm.hg import archival_to_version, parse
from setuptools_scm import integration
from setuptools_scm.config import Configuration
from setuptools_scm.utils import has_command
import pytest
import warnings


with warnings.catch_warnings():
warnings.filterwarnings("ignore")
if not has_command("hg"):
pytestmark = pytest.mark.skip(reason="hg executable not found")


@pytest.fixture
Expand Down