File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -13168,12 +13168,26 @@ def tearDown(self):
13168
13168
else:
13169
13169
# (Nosetests / Behave / Pure Python)
13170
13170
if hasattr(self, "is_behave") and self.is_behave:
13171
+ import colorama
13172
+
13171
13173
if sb_config.behave_scenario.status.name == "failed":
13172
13174
has_exception = True
13173
13175
sb_config._has_exception = True
13174
- print(" ❌ Scenario Failed! (Skipping remaining steps:)")
13176
+ msg = " ❌ Scenario Failed! (Skipping remaining steps:)"
13177
+ if is_windows:
13178
+ c1 = colorama.Fore.RED + colorama.Back.LIGHTRED_EX
13179
+ cr = colorama.Style.RESET_ALL
13180
+ colorama.init(autoreset=True)
13181
+ msg = msg.replace("❌", c1 + "><" + cr)
13182
+ print(msg)
13175
13183
else:
13176
- print(" ✅ Scenario Passed!")
13184
+ msg = " ✅ Scenario Passed!"
13185
+ if is_windows:
13186
+ c2 = colorama.Fore.GREEN + colorama.Back.LIGHTGREEN_EX
13187
+ cr = colorama.Style.RESET_ALL
13188
+ colorama.init(autoreset=True)
13189
+ msg = msg.replace("✅", c2 + "<>" + cr)
13190
+ print(msg)
13177
13191
if self.dashboard:
13178
13192
self.__process_dashboard(has_exception)
13179
13193
if self.headless or self.xvfb:
You can’t perform that action at this time.
0 commit comments