Skip to content

Commit 9d7b919

Browse files
committed
Fix pypy3.6 on windows
1 parent 8c8809e commit 9d7b919

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

changelog/5807.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix pypy3.6 (nightly) on windows.

src/_pytest/capture.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,11 @@ def _py36_windowsconsoleio_workaround(stream):
789789
790790
See https://github.com/pytest-dev/py/issues/103
791791
"""
792-
if not sys.platform.startswith("win32") or sys.version_info[:2] < (3, 6):
792+
if (
793+
not sys.platform.startswith("win32")
794+
or sys.version_info[:2] < (3, 6)
795+
or hasattr(sys, "pypy_version_info")
796+
):
793797
return
794798

795799
# bail out if ``stream`` doesn't seem like a proper ``io`` stream (#2666)

0 commit comments

Comments
 (0)