Skip to content

Commit

Permalink
only run for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonykim1 committed Jan 19, 2024
1 parent 29a03fe commit ff5c4cb
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions pythonFiles/tests/test_shell_integration.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import importlib
import sys
from unittest.mock import Mock

import pythonrc


Expand All @@ -10,10 +10,13 @@ def test_decoration_success():

ps1.hooks.failure_flag = False
result = str(ps1)
assert (
result
== "\x1b]633;D;0\x07\x1b]633;A\x07>>> \x1b]633;B\x07\x1b]633;C\x07\x1b]633;E;None\x07"
)
if sys.platform != "win32":
assert (
result
== "\x1b]633;D;0\x07\x1b]633;A\x07>>> \x1b]633;B\x07\x1b]633;C\x07\x1b]633;E;None\x07"
)
else:
pass


def test_decoration_failure():
Expand All @@ -22,11 +25,13 @@ def test_decoration_failure():

ps1.hooks.failure_flag = True
result = str(ps1)

assert (
result
== "\x1b]633;D;1\x07\x1b]633;A\x07>>> \x1b]633;B\x07\x1b]633;C\x07\x1b]633;E;None\x07"
)
if sys.platform != "win32":
assert (
result
== "\x1b]633;D;1\x07\x1b]633;A\x07>>> \x1b]633;B\x07\x1b]633;C\x07\x1b]633;E;None\x07"
)
else:
pass


def test_displayhook_call():
Expand Down

0 comments on commit ff5c4cb

Please sign in to comment.