diff options
author | Michał Górny <mgorny@gentoo.org> | 2020-05-06 22:11:45 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2020-05-06 22:16:46 +0200 |
commit | b447ca04f2b0bb6f8a66fc47195f10f1b9ed2be5 (patch) | |
tree | d2235035f485707ec6e232dfd434b2abcfd68a01 /testing/test_file_finder.py | |
parent | 197195f52755142a97fa599d32dac83a5b5deb4a (diff) | |
download | setuptools-scm-b447ca04f2b0bb6f8a66fc47195f10f1b9ed2be5.tar.gz |
Skip mercurial tests when hg is not available
Mercurial is broken (read: crashing with bus error) on SPARC.
Nevertheless, many packages need setuptools_scm even if we never ever
use Mercurial checkouts. This patch makes it possible to run the test
suite successfully when Mercurial is not available on the system.
Diffstat (limited to 'testing/test_file_finder.py')
-rw-r--r-- | testing/test_file_finder.py | 5 |
1 files changed, 4 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() |