You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
383 B
19 lines
383 B
import configparser
|
|
import pytest
|
|
|
|
|
|
config = configparser.ConfigParser()
|
|
|
|
|
|
@pytest.fixture(scope="session", autouse=True)
|
|
def headless():
|
|
return _str_to_bool(_read_config_section("fixtures.ini", "dev")["headless"])
|
|
|
|
|
|
def _read_config_section(source, section):
|
|
config.read(source)
|
|
return config[section]
|
|
|
|
|
|
def _str_to_bool(s):
|
|
return s.lower() in ['true', '1', 'yes']
|
|
|