|
1 | 1 | # -*- coding: utf-8 -*-
|
2 |
| -""" This is the pytest configuration file """ |
| 2 | +""" This is the pytest configuration file for setting test options. """ |
3 | 3 |
|
4 | 4 | import colorama
|
5 | 5 | import os
|
@@ -69,11 +69,17 @@ def pytest_addoption(parser):
|
69 | 69 | --visual-baseline (Set the visual baseline for Visual/Layout tests.)
|
70 | 70 | --timeout-multiplier=MULTIPLIER (Multiplies the default timeout values.)
|
71 | 71 | """
|
72 |
| - colorama.init(autoreset=True) |
73 |
| - c1 = colorama.Fore.BLUE + colorama.Back.LIGHTCYAN_EX |
74 |
| - c2 = colorama.Fore.BLUE + colorama.Back.LIGHTGREEN_EX |
75 |
| - c3 = colorama.Fore.MAGENTA + colorama.Back.LIGHTYELLOW_EX |
76 |
| - cr = colorama.Style.RESET_ALL |
| 72 | + c1 = "" |
| 73 | + c2 = "" |
| 74 | + c3 = "" |
| 75 | + cr = "" |
| 76 | + if "linux" not in sys.platform: |
| 77 | + # This will be seen when typing "pytest --help" on the command line. |
| 78 | + colorama.init(autoreset=True) |
| 79 | + c1 = colorama.Fore.BLUE + colorama.Back.LIGHTCYAN_EX |
| 80 | + c2 = colorama.Fore.BLUE + colorama.Back.LIGHTGREEN_EX |
| 81 | + c3 = colorama.Fore.MAGENTA + colorama.Back.LIGHTYELLOW_EX |
| 82 | + cr = colorama.Style.RESET_ALL |
77 | 83 | s_str = "SeleniumBase"
|
78 | 84 | s_str = s_str.replace("SeleniumBase", c1 + "Selenium" + c2 + "Base" + cr)
|
79 | 85 | s_str = s_str + cr + " " + c3 + "command-line options for pytest" + cr
|
@@ -807,7 +813,7 @@ def pytest_unconfigure():
|
807 | 813 | def sb(request):
|
808 | 814 | """ SeleniumBase as a pytest fixture.
|
809 | 815 | Usage example: "def test_one(sb):"
|
810 |
| - You'll need to use this for tests that use other pytest fixtures. """ |
| 816 | + You may need to use this for tests that use other pytest fixtures. """ |
811 | 817 | from seleniumbase import BaseCase
|
812 | 818 |
|
813 | 819 | class BaseClass(BaseCase):
|
|
0 commit comments