Skip to content

Commit cea0269

Browse files
committed
Fix missing git/hg handling in tests for py27
1 parent ffa49f4 commit cea0269

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

testing/test_file_finder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def inwd(request, wd, monkeypatch):
1111
if request.param == "git":
1212
try:
1313
wd("git init")
14-
except FileNotFoundError:
14+
except OSError:
1515
pytest.skip("git executable not found")
1616
wd("git config user.email [email protected]")
1717
wd('git config user.name "a test"')
@@ -20,7 +20,7 @@ def inwd(request, wd, monkeypatch):
2020
elif request.param == "hg":
2121
try:
2222
wd("hg init")
23-
except FileNotFoundError:
23+
except OSError:
2424
pytest.skip("hg executable not found")
2525
wd.add_command = "hg add ."
2626
wd.commit_command = 'hg commit -m test-{reason} -u test -d "0 0"'

testing/test_integration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
def wd(wd):
1010
try:
1111
wd("git init")
12-
except FileNotFoundError:
12+
except OSError:
1313
pytest.skip("git executable not found")
1414

1515
wd("git config user.email [email protected]")

testing/test_regressions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def test_pkginfo_noscmroot(tmpdir, monkeypatch):
2929

3030
try:
3131
do("git init", p.dirpath())
32-
except FileNotFoundError:
32+
except OSError:
3333
pass
3434
else:
3535
res = do((sys.executable, "setup.py", "--version"), p)

0 commit comments

Comments
 (0)