summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-05-25 07:56:06 +0200
committerMichał Górny <mgorny@gentoo.org>2020-05-25 07:56:06 +0200
commitcea026932a198981988ffc4c05c8754afd6be7d2 (patch)
tree4cf0e918250fcf4db29949e7ba33552d0c4b963d
parentffa49f402b95fb22bd0ff85aec5e20efa5769050 (diff)
downloadsetuptools-scm-cea026932a198981988ffc4c05c8754afd6be7d2.tar.gz
Fix missing git/hg handling in tests for py27
-rw-r--r--testing/test_file_finder.py4
-rw-r--r--testing/test_integration.py2
-rw-r--r--testing/test_regressions.py2
3 files changed, 4 insertions, 4 deletions
diff --git a/testing/test_file_finder.py b/testing/test_file_finder.py
index e5c2437..a6e3d70 100644
--- a/testing/test_file_finder.py
+++ b/testing/test_file_finder.py
@@ -11,7 +11,7 @@ def inwd(request, wd, monkeypatch):
if request.param == "git":
try:
wd("git init")
- except FileNotFoundError:
+ except OSError:
pytest.skip("git executable not found")
wd("git config user.email test@example.com")
wd('git config user.name "a test"')
@@ -20,7 +20,7 @@ def inwd(request, wd, monkeypatch):
elif request.param == "hg":
try:
wd("hg init")
- except FileNotFoundError:
+ except OSError:
pytest.skip("hg executable not found")
wd.add_command = "hg add ."
wd.commit_command = 'hg commit -m test-{reason} -u test -d "0 0"'
diff --git a/testing/test_integration.py b/testing/test_integration.py
index 1c291db..68c3bfe 100644
--- a/testing/test_integration.py
+++ b/testing/test_integration.py
@@ -9,7 +9,7 @@ from setuptools_scm.utils import do
def wd(wd):
try:
wd("git init")
- except FileNotFoundError:
+ except OSError:
pytest.skip("git executable not found")
wd("git config user.email test@example.com")
diff --git a/testing/test_regressions.py b/testing/test_regressions.py
index 0ac255e..8bde373 100644
--- a/testing/test_regressions.py
+++ b/testing/test_regressions.py
@@ -29,7 +29,7 @@ def test_pkginfo_noscmroot(tmpdir, monkeypatch):
try:
do("git init", p.dirpath())
- except FileNotFoundError:
+ except OSError:
pass
else:
res = do((sys.executable, "setup.py", "--version"), p)