Skip to content

Commit 5edba1b

Browse files
committed
Remove unneeded code
1 parent 0303c9d commit 5edba1b

File tree

1 file changed

+2
-45
lines changed

1 file changed

+2
-45
lines changed

conftest.py

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -77,55 +77,12 @@ def pytest_addoption(parser):
7777

7878

7979
def pytest_configure(config):
80-
with_selenium = config.getoption('with_selenium')
81-
with_testing_base = config.getoption('with_testing_base')
82-
with_db_reporting = config.getoption('with_db_reporting')
83-
with_s3_logging = config.getoption('with_s3_logging')
84-
with_screen_shots = config.getoption('with_screen_shots')
85-
with_basic_test_info = config.getoption('with_basic_test_info')
86-
with_page_source = config.getoption('with_page_source')
87-
database_env = config.getoption('database_env')
88-
browser = config.getoption('browser')
89-
log_path = config.getoption('log_path')
90-
headless = config.getoption('headless')
91-
demo_mode = config.getoption('demo_mode')
92-
demo_sleep = ''
93-
data = ''
94-
if config.getoption('demo_sleep') is not None:
95-
demo_sleep = config.getoption('demo_sleep')
96-
if config.getoption('data') is not None:
97-
data = config.getoption('data')
98-
if config.getoption('database_env') is not None:
99-
database_env = config.getoption('database_env')
100-
# Create a temporary config file while tests are running
101-
pytest_config = '.pytest_config'
102-
config_file = open(pytest_config, 'w+')
103-
config_file.write("with_selenium:::%s\n" % with_selenium)
104-
config_file.write("browser:::%s\n" % browser)
105-
config_file.write("data:::%s\n" % data)
106-
config_file.write("with_testing_base:::%s\n" % with_testing_base)
107-
config_file.write("with_db_reporting:::%s\n" % with_db_reporting)
108-
config_file.write("with_s3_logging:::%s\n" % with_s3_logging)
109-
config_file.write("with_screen_shots:::%s\n" % with_screen_shots)
110-
config_file.write("with_basic_test_info:::%s\n" % with_basic_test_info)
111-
config_file.write("with_page_source:::%s\n" % with_page_source)
112-
config_file.write("database_env:::%s\n" % database_env)
113-
config_file.write("log_path:::%s\n" % log_path)
114-
config_file.write("headless:::%s\n" % headless)
115-
config_file.write("demo_mode:::%s\n" % demo_mode)
116-
config_file.write("demo_sleep:::%s\n" % demo_sleep)
117-
config_file.close()
80+
""" This runs after command line options have been parsed """
11881
log_folder_setup(config)
11982

12083

121-
def pytest_unconfigure():
122-
pytest_config = '.pytest_config'
123-
if os.path.isfile(pytest_config):
124-
os.remove(pytest_config)
125-
126-
12784
def log_folder_setup(config):
128-
# Handle Logging
85+
""" Handle Logging """
12986
with_testing_base = config.getoption('with_testing_base')
13087
if with_testing_base:
13188
log_path = config.getoption('log_path')

0 commit comments

Comments
 (0)