Skip to content

Commit 08f8f3a

Browse files
committed
Refactor BaseCase
1 parent fcdcf83 commit 08f8f3a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

seleniumbase/fixtures/base_case.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ def test_anything(self):
9595
logging.getLogger("urllib3").setLevel(logging.ERROR)
9696
urllib3.disable_warnings()
9797
LOGGER.setLevel(logging.WARNING)
98+
is_linux = shared_utils.is_linux()
9899
is_windows = shared_utils.is_windows()
99100
python3_11_or_newer = False
100101
if sys.version_info >= (3, 11):
@@ -4828,7 +4829,7 @@ def activate_recorder(self):
48284829
from seleniumbase.js_code.recorder_js import recorder_js
48294830

48304831
if not self.is_chromium():
4831-
if "linux" not in sys.platform:
4832+
if not is_linux:
48324833
c1 = colorama.Fore.BLUE + colorama.Back.LIGHTCYAN_EX
48334834
c2 = colorama.Fore.BLUE + colorama.Back.LIGHTGREEN_EX
48344835
cr = colorama.Style.RESET_ALL
@@ -5658,7 +5659,7 @@ def __process_recorded_actions(self):
56585659
c1 = ""
56595660
c2 = ""
56605661
cr = ""
5661-
if "linux" not in sys.platform:
5662+
if not is_linux:
56625663
c1 = colorama.Fore.RED + colorama.Back.LIGHTYELLOW_EX
56635664
c2 = colorama.Fore.LIGHTRED_EX + colorama.Back.LIGHTYELLOW_EX
56645665
cr = colorama.Style.RESET_ALL
@@ -5760,7 +5761,7 @@ def __process_recorded_behave_actions(self, srt_actions, colorama):
57605761
c1 = ""
57615762
c2 = ""
57625763
cr = ""
5763-
if "linux" not in sys.platform:
5764+
if not is_linux:
57645765
c1 = colorama.Fore.RED + colorama.Back.LIGHTYELLOW_EX
57655766
c2 = colorama.Fore.LIGHTRED_EX + colorama.Back.LIGHTYELLOW_EX
57665767
cr = colorama.Style.RESET_ALL

0 commit comments

Comments
 (0)