Skip to content

Commit d516da6

Browse files
authored
Merge pull request #190 from Joaq33/fix_pytest_pycharm_linux
fix pycharm/pytest output in linux
2 parents 8f3f374 + 92a6d78 commit d516da6

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

icecream/icecream.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,12 @@ def colorize(s):
5757
def supportTerminalColorsInWindows():
5858
# Filter and replace ANSI escape sequences on Windows with equivalent Win32
5959
# API calls. This code does nothing on non-Windows systems.
60-
colorama.init()
61-
yield
62-
colorama.deinit()
60+
if sys.platform.startswith('win'):
61+
colorama.init()
62+
yield
63+
colorama.deinit()
64+
else:
65+
yield
6366

6467

6568
def stderrPrint(*args):

0 commit comments

Comments
 (0)