Easier read with _colorama_workaround/_readline_workaround
This commit is contained in:
parent
920bffbfbb
commit
7395501d1d
|
@ -706,11 +706,9 @@ def _colorama_workaround():
|
||||||
first import of colorama while I/O capture is active, colorama will
|
first import of colorama while I/O capture is active, colorama will
|
||||||
fail in various ways.
|
fail in various ways.
|
||||||
"""
|
"""
|
||||||
|
if sys.platform.startswith("win32"):
|
||||||
if not sys.platform.startswith("win32"):
|
|
||||||
return
|
|
||||||
try:
|
try:
|
||||||
import colorama # noqa
|
import colorama # noqa: F401
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -733,11 +731,9 @@ def _readline_workaround():
|
||||||
|
|
||||||
See https://github.com/pytest-dev/pytest/pull/1281
|
See https://github.com/pytest-dev/pytest/pull/1281
|
||||||
"""
|
"""
|
||||||
|
if sys.platform.startswith("win32"):
|
||||||
if not sys.platform.startswith("win32"):
|
|
||||||
return
|
|
||||||
try:
|
try:
|
||||||
import readline # noqa
|
import readline # noqa: F401
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue