Skip to content

Commit d56f119

Browse files
authored
Fix failing windows tests (PyCQA#528)
Signed-off-by: Sambhav Kothari <[email protected]>
1 parent 5f59f6e commit d56f119

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
matrix:
1010
os: [macos-latest, ubuntu-latest, windows-latest]
11-
python-version: [3.6, 3.7, 3.8, 3.9-dev]
11+
python-version: [3.6, 3.7, 3.8, 3.9]
1212

1313
steps:
1414
- uses: actions/checkout@v2

src/tests/test_integration.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import tempfile
1111
import textwrap
1212
import subprocess
13+
import sys
1314

1415
from unittest import mock
1516

@@ -107,9 +108,13 @@ def install_package(request):
107108
script.
108109
"""
109110
cwd = os.path.join(os.path.dirname(__file__), '..', '..')
110-
subprocess.check_call(shlex.split("pip install -e ."), cwd=cwd)
111+
subprocess.check_call(
112+
[sys.executable, "-m", "pip", "install", "-e", "."], cwd=cwd
113+
)
111114
yield
112-
subprocess.check_call(shlex.split("pip uninstall -y pydocstyle"), cwd=cwd)
115+
subprocess.check_call(
116+
[sys.executable, "-m", "pip", "uninstall", "-y", "pydocstyle"], cwd=cwd
117+
)
113118

114119

115120
@pytest.yield_fixture(scope="function")
@@ -226,7 +231,7 @@ def test_run_as_named_module():
226231
"""
227232
# Add --match='' so that no files are actually checked (to make sure that
228233
# the return code is 0 and to reduce execution time).
229-
cmd = shlex.split("python -m pydocstyle --match=''")
234+
cmd = [sys.executable, "-m", "pydocstyle", "--match=''"]
230235
p = subprocess.Popen(cmd,
231236
stdout=subprocess.PIPE,
232237
stderr=subprocess.PIPE)

0 commit comments

Comments
 (0)