Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonykim1 committed Nov 15, 2024
1 parent 9b26fde commit 3d117a1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions python_files/tests/test_shell_integration.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
import importlib
import platform
import sys
from unittest.mock import Mock

import pythonrc

is_wsl = "microsoft-standard-WSL" in platform.release()


def test_decoration_success():
importlib.reload(pythonrc)
ps1 = pythonrc.PS1()

ps1.hooks.failure_flag = False
result = str(ps1)
if sys.platform != "win32":
if sys.platform != "win32" and (not is_wsl):
assert (
result
== "\x1b]633;E;None\x07\x1b]633;D;0\x07\x1b]633;A\x07>>> \x1b]633;B\x07\x1b]633;C\x07"
Expand All @@ -26,7 +29,7 @@ def test_decoration_failure():

ps1.hooks.failure_flag = True
result = str(ps1)
if sys.platform != "win32":
if sys.platform != "win32" and (not is_wsl):
assert (
result
== "\x1b]633;E;None\x07\x1b]633;D;1\x07\x1b]633;A\x07>>> \x1b]633;B\x07\x1b]633;C\x07"
Expand Down

0 comments on commit 3d117a1

Please sign in to comment.