Skip to content

Commit cff0bf5

Browse files
committed
Skip py2-py3 tests on Windows as GH actions doesn't support py2 and py3 at the same time
1 parent c6de3a2 commit cff0bf5

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

testing/test_serializer.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# -*- coding: utf-8 -*-
2+
import os
23
import subprocess
34
import sys
45
import tempfile
@@ -148,6 +149,14 @@ def load(request):
148149

149150
@py.test.mark.parametrize(["tp_name", "repr"], simple_tests)
150151
def test_simple(tp_name, repr, dump, load):
152+
if (
153+
sys.platform.startswith("win")
154+
and os.environ.get("GITHUB_ACTIONS", "") == "true"
155+
):
156+
pytest.skip(
157+
"GitHub Actions on Windows doesn't support Python 2 and 3 at the same time."
158+
)
159+
151160
p = dump(repr)
152161
tp, v = load(p)
153162
assert tp == tp_name

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ envlist=py27,py37,docs,linting
55
deps=
66
pytest
77
pytest-timeout
8+
passenv = GITHUB_ACTIONS
89
commands=
910
pytest {posargs:testing}
1011

0 commit comments

Comments
 (0)