Skip to content

Commit 4051894

Browse files
committed
test: fix test_wheel_python_3_only()
1 parent c503c58 commit 4051894

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

mss/tests/test_setup.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,25 @@
22
This is part of the MSS Python's module.
33
Source: https://github.com/BoboTiG/python-mss
44
"""
5+
import platform
56
from subprocess import STDOUT, check_call, check_output
67

8+
import pytest
9+
710
from mss import __version__
811

9-
INSTALL = "python -m build --sdist --wheel".split()
12+
if platform.system().lower() != "linux":
13+
pytestmark = pytest.mark.skip
14+
15+
# Note: using `--no-isolation` because it doesn't work with `tox`
16+
INSTALL = "python -m build --no-isolation --sdist --wheel".split()
1017
CHECK = "twine check dist/*".split()
1118

1219

1320
def test_wheel_python_3_only():
1421
"""Ensure the produced wheel is Python 3 only."""
15-
output = check_output(INSTALL, stderr=STDOUT, text=True)
16-
text = f"mss-{__version__}-py3-none-any.whl"
22+
output = str(check_output(INSTALL, stderr=STDOUT))
23+
text = f"Successfully built mss-{__version__}.tar.gz and mss-{__version__}-py3-none-any.whl"
1724
assert text in output
1825

19-
print(output)
20-
assert "warning" not in output.lower()
21-
2226
check_call(CHECK)

0 commit comments

Comments
 (0)