@@ -31,6 +31,7 @@ def test_anything(self):
31
31
import unittest
32
32
import uuid
33
33
from bs4 import BeautifulSoup
34
+ from seleniumbase import config as sb_config
34
35
from seleniumbase .common import decorators
35
36
from seleniumbase .config import settings
36
37
from seleniumbase .core .application_manager import ApplicationManager
@@ -2727,7 +2728,7 @@ def setUp(self):
2727
2728
self .is_pytest = None
2728
2729
try :
2729
2730
# This raises an exception if the test is not coming from pytest
2730
- self .is_pytest = pytest . config . option .is_pytest
2731
+ self .is_pytest = sb_config .is_pytest
2731
2732
except Exception :
2732
2733
# Not using pytest (probably nosetests)
2733
2734
self .is_pytest = False
@@ -2736,34 +2737,33 @@ def setUp(self):
2736
2737
test_id = "%s.%s.%s" % (self .__class__ .__module__ ,
2737
2738
self .__class__ .__name__ ,
2738
2739
self ._testMethodName )
2739
- self .environment = pytest .config .option .environment
2740
+ self .browser = sb_config .browser
2741
+ self .data = sb_config .data
2742
+ self .demo_mode = sb_config .demo_mode
2743
+ self .demo_sleep = sb_config .demo_sleep
2744
+ self .highlights = sb_config .highlights
2745
+ self .environment = sb_config .environment
2740
2746
self .env = self .environment # Add a shortened version
2741
- self .with_selenium = pytest . config . option . with_selenium
2742
- self .headless = pytest . config . option .headless
2747
+ self .with_selenium = sb_config . with_selenium # Should be True
2748
+ self .headless = sb_config .headless
2743
2749
self .headless_active = False
2744
- self .with_testing_base = pytest .config .option .with_testing_base
2745
- self .with_db_reporting = pytest .config .option .with_db_reporting
2746
- self .with_s3_logging = pytest .config .option .with_s3_logging
2747
- self .with_screen_shots = pytest .config .option .with_screen_shots
2748
- self .with_basic_test_info = (
2749
- pytest .config .option .with_basic_test_info )
2750
- self .with_page_source = pytest .config .option .with_page_source
2751
- self .servername = pytest .config .option .servername
2752
- self .port = pytest .config .option .port
2753
- self .proxy_string = pytest .config .option .proxy_string
2754
- self .cap_file = pytest .config .option .cap_file
2755
- self .database_env = pytest .config .option .database_env
2756
- self .log_path = pytest .config .option .log_path
2757
- self .browser = pytest .config .option .browser
2758
- self .data = pytest .config .option .data
2759
- self .demo_mode = pytest .config .option .demo_mode
2760
- self .demo_sleep = pytest .config .option .demo_sleep
2761
- self .highlights = pytest .config .option .highlights
2762
- self .message_duration = pytest .config .option .message_duration
2763
- self .js_checking_on = pytest .config .option .js_checking_on
2764
- self .ad_block_on = pytest .config .option .ad_block_on
2765
- self .verify_delay = pytest .config .option .verify_delay
2766
- self .timeout_multiplier = pytest .config .option .timeout_multiplier
2750
+ self .log_path = sb_config .log_path
2751
+ self .with_testing_base = sb_config .with_testing_base
2752
+ self .with_basic_test_info = sb_config .with_basic_test_info
2753
+ self .with_screen_shots = sb_config .with_screen_shots
2754
+ self .with_page_source = sb_config .with_page_source
2755
+ self .with_db_reporting = sb_config .with_db_reporting
2756
+ self .with_s3_logging = sb_config .with_s3_logging
2757
+ self .servername = sb_config .servername
2758
+ self .port = sb_config .port
2759
+ self .proxy_string = sb_config .proxy_string
2760
+ self .cap_file = sb_config .cap_file
2761
+ self .database_env = sb_config .database_env
2762
+ self .message_duration = sb_config .message_duration
2763
+ self .js_checking_on = sb_config .js_checking_on
2764
+ self .ad_block_on = sb_config .ad_block_on
2765
+ self .verify_delay = sb_config .verify_delay
2766
+ self .timeout_multiplier = sb_config .timeout_multiplier
2767
2767
self .use_grid = False
2768
2768
if self .servername != "localhost" :
2769
2769
# Use Selenium Grid (Use --server=127.0.0.1 for localhost Grid)
@@ -2898,7 +2898,7 @@ def tearDown(self):
2898
2898
self .is_pytest = None
2899
2899
try :
2900
2900
# This raises an exception if the test is not coming from pytest
2901
- self .is_pytest = pytest . config . option .is_pytest
2901
+ self .is_pytest = sb_config .is_pytest
2902
2902
except Exception :
2903
2903
# Not using pytest (probably nosetests)
2904
2904
self .is_pytest = False
0 commit comments