summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--testing/test_file_finder.py5
-rw-r--r--testing/test_mercurial.py8
2 files changed, 12 insertions, 1 deletions
diff --git a/testing/test_file_finder.py b/testing/test_file_finder.py
index c9409c4..d7b6d11 100644
--- a/testing/test_file_finder.py
+++ b/testing/test_file_finder.py
@@ -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()
diff --git a/testing/test_mercurial.py b/testing/test_mercurial.py
index c20c2fd..29370c1 100644
--- a/testing/test_mercurial.py
+++ b/testing/test_mercurial.py
@@ -2,7 +2,15 @@ from setuptools_scm import format_version
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