diff options
author | Ronny Pfannschmidt <opensource@ronnypfannschmidt.de> | 2020-05-25 11:53:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-25 11:53:10 +0200 |
commit | 122b841592944cba21628aff770c089442f36e8c (patch) | |
tree | 9c4396a17f6a1296a0db8212afc05988878f24d7 | |
parent | 2d21b5f56b930f360a0ff508dbb81ecdcfc4e370 (diff) | |
parent | cea026932a198981988ffc4c05c8754afd6be7d2 (diff) | |
download | setuptools-scm-122b841592944cba21628aff770c089442f36e8c.tar.gz |
Merge pull request #443 from mgorny/py27-fnfe
Fix missing git/hg handling in tests for py27
-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) |