Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
Fix failing windows tests (#528)
Browse files Browse the repository at this point in the history
Signed-off-by: Sambhav Kothari <skothari44@bloomberg.net>
  • Loading branch information
samj1912 committed Mar 18, 2021
1 parent 5f59f6e commit d56f119
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
python-version: [3.6, 3.7, 3.8, 3.9-dev]
python-version: [3.6, 3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2
Expand Down
11 changes: 8 additions & 3 deletions src/tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import tempfile
import textwrap
import subprocess
import sys

from unittest import mock

Expand Down Expand Up @@ -107,9 +108,13 @@ def install_package(request):
script.
"""
cwd = os.path.join(os.path.dirname(__file__), '..', '..')
subprocess.check_call(shlex.split("pip install -e ."), cwd=cwd)
subprocess.check_call(
[sys.executable, "-m", "pip", "install", "-e", "."], cwd=cwd
)
yield
subprocess.check_call(shlex.split("pip uninstall -y pydocstyle"), cwd=cwd)
subprocess.check_call(
[sys.executable, "-m", "pip", "uninstall", "-y", "pydocstyle"], cwd=cwd
)


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

0 comments on commit d56f119

Please sign in to comment.