diff options
-rw-r--r-- | testing/test_file_finder.py | 4 | ||||
-rw-r--r-- | testing/test_integration.py | 2 | ||||
-rw-r--r-- | testing/test_regressions.py | 2 |
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) |