Skip to content

Commit

Permalink
Fix Windows failure (#2056)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborbernat committed Jan 19, 2021
1 parent 40aec48 commit a9b0f3b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/virtualenv/util/subprocess/_win_subprocess.py
Expand Up @@ -155,6 +155,7 @@ def _execute_child(
args = args.decode('utf-8')
startupinfo.dwFlags |= _subprocess.STARTF_USESHOWWINDOW
startupinfo.wShowWindow = _subprocess.SW_HIDE
env = os.environ if env is None else env
comspec = env.get("COMSPEC", unicode("cmd.exe"))
if (
_subprocess.GetVersion() >= 0x80000000 or
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/config/test___main__.py
@@ -1,6 +1,5 @@
from __future__ import absolute_import, unicode_literals

import os
import re
import sys

Expand Down Expand Up @@ -91,8 +90,9 @@ def test_session_report_subprocess(session_app_data, tmp_path):
# when called via a subprocess the logging framework should flush and POSIX line normalization happen
out = subprocess.check_output(
[sys.executable, "-m", "virtualenv", str(tmp_path), "--activators", "powershell", "--without-pip"],
universal_newlines=True,
)
lines = out.decode().split(os.linesep)
lines = out.split("\n")
regexes = [
r"created virtual environment .* in \d+ms",
r" creator .*",
Expand Down

0 comments on commit a9b0f3b

Please sign in to comment.