File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 11import importlib
2+ import platform
23import sys
34from unittest .mock import Mock
45
56import pythonrc
67
8+ is_wsl = "microsoft-standard-WSL" in platform .release ()
9+
710
811def test_decoration_success ():
912 importlib .reload (pythonrc )
1013 ps1 = pythonrc .PS1 ()
1114
1215 ps1 .hooks .failure_flag = False
1316 result = str (ps1 )
14- if sys .platform != "win32" :
17+ if sys .platform != "win32" and ( not is_wsl ) :
1518 assert (
1619 result
1720 == "\x1b ]633;E;None\x07 \x1b ]633;D;0\x07 \x1b ]633;A\x07 >>> \x1b ]633;B\x07 \x1b ]633;C\x07 "
@@ -26,7 +29,7 @@ def test_decoration_failure():
2629
2730 ps1 .hooks .failure_flag = True
2831 result = str (ps1 )
29- if sys .platform != "win32" :
32+ if sys .platform != "win32" and ( not is_wsl ) :
3033 assert (
3134 result
3235 == "\x1b ]633;E;None\x07 \x1b ]633;D;1\x07 \x1b ]633;A\x07 >>> \x1b ]633;B\x07 \x1b ]633;C\x07 "
You can’t perform that action at this time.
0 commit comments