Skip to content

Commit c17e67f

Browse files
committed
Adding Windows + Py 2.7 test, skips
1 parent 55c4c7c commit c17e67f

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

.github/workflows/python-tests.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ jobs:
1818
python_version: [ '2.7', '3.5', '3.6', '3.7', '3.8', 'pypy2', 'pypy3' ]
1919
os: [windows-latest, ubuntu-latest] #, macos-latest]
2020
exclude:
21-
- os: windows-latest
22-
python_version: "2.7"
2321
- os: windows-latest
2422
python_version: "pypy2"
2523
include:

testing/test_file_finder.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
@pytest.fixture(params=["git", "hg"])
1010
def inwd(request, wd, monkeypatch):
1111
if request.param == "git":
12+
if sys.platform == "win32" and sys.version_info[0] < 3:
13+
pytest.skip("Long/short path names supported on Windows Python 2.7")
1214
try:
1315
wd("git init")
1416
except OSError:

testing/test_git.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
import warnings
1111

1212

13+
skip_if_win_27 = pytest.mark.skipif(
14+
sys.platform == "win32" and sys.version_info[0] < 3,
15+
reason="Not supported on Windows + Python 2.7",
16+
)
17+
18+
1319
with warnings.catch_warnings():
1420
warnings.filterwarnings("ignore")
1521
if not has_command("git"):
@@ -186,6 +192,7 @@ def test_alphanumeric_tags_match(wd):
186192
assert wd.version.startswith("0.1.dev1+g")
187193

188194

195+
@skip_if_win_27
189196
def test_git_archive_export_ignore(wd, monkeypatch):
190197
wd.write("test1.txt", "test")
191198
wd.write("test2.txt", "test")
@@ -201,6 +208,7 @@ def test_git_archive_export_ignore(wd, monkeypatch):
201208
assert integration.find_files(".") == [opj(".", "test1.txt")]
202209

203210

211+
@skip_if_win_27
204212
@pytest.mark.issue(228)
205213
def test_git_archive_subdirectory(wd, monkeypatch):
206214
wd("mkdir foobar")
@@ -211,6 +219,7 @@ def test_git_archive_subdirectory(wd, monkeypatch):
211219
assert integration.find_files(".") == [opj(".", "foobar", "test1.txt")]
212220

213221

222+
@skip_if_win_27
214223
@pytest.mark.issue(251)
215224
def test_git_archive_run_from_subdirectory(wd, monkeypatch):
216225
wd("mkdir foobar")

0 commit comments

Comments
 (0)