2.1.1. tests.conftest
2.1.1.1. Attributes
2.1.1.2. Functions
|
Configure pytest logging and conditionally load target plugins. |
|
Load the YAML configuration once per test session. |
|
Resolve and return the selected platform dictionary from the YAML config. |
|
Build the platform bundle once from the config. |
|
Provide the platform driver object for tests. |
|
Provide the session/console manager for tests. |
|
Normalize the selected platform name to a canonical short name. |
|
Construct the base platform helper object once per session. |
|
Register custom CLI options used by the test framework. |
2.1.1.3. Module Contents
- tests.conftest.pytest_configure(config)[source]
Configure pytest logging and conditionally load target plugins.
- Parameters:
config (pytest.Config) – Pytest configuration object.
- Returns:
None.
- Return type:
None
- tests.conftest.cfg(pytestconfig)[source]
Load the YAML configuration once per test session.
- Parameters:
pytestconfig (pytest.Config) – Pytest configuration object.
- Returns:
Parsed
Configinstance.- Return type:
- tests.conftest.auto_platform_config_data(pytestconfig, cfg)[source]
Resolve and return the selected platform dictionary from the YAML config.
- Parameters:
pytestconfig (pytest.Config) – Pytest configuration object.
cfg (test_automation.configs.config.Config) – Parsed configuration object.
- Returns:
Platform configuration dictionary.
- Return type:
dict
- tests.conftest.platform_bundle(pytestconfig, cfg, auto_platform_config_data)[source]
Build the platform bundle once from the config.
- Parameters:
pytestconfig – Pytest configuration object.
cfg (test_automation.configs.config.Config) – Parsed configuration object.
auto_platform_config_data – Platform configuration dictionary.
- Returns:
Yields an initialized
DriverBundle.
- tests.conftest.platform_driver(platform_bundle)[source]
Provide the platform driver object for tests.
- Parameters:
platform_bundle – Initialized driver bundle.
- Returns:
Driver instance from the bundle.
- tests.conftest.session_manager(platform_bundle)[source]
Provide the session/console manager for tests.
- Parameters:
platform_bundle – Initialized driver bundle.
- Returns:
Session manager object.
- tests.conftest.platform_name(platform_base_obj, cfg)[source]
Normalize the selected platform name to a canonical short name.
- Parameters:
platform_base_obj – Initialized
AutoTestPlatformBase.cfg (test_automation.configs.config.Config) – Parsed configuration object.
- Returns:
Canonical name like
'aspne'.- Return type:
str
- tests.conftest.platform_base_obj(session_manager, auto_platform_config_data, pytestconfig)[source]
Construct the base platform helper object once per session.
- Parameters:
session_manager – Session/console manager instance.
auto_platform_config_data – Platform configuration dictionary.
pytestconfig – Pytest configuration object.
- Returns:
Initialized
AutoTestPlatformBaseinstance.- Return type:
test_automation.utils.auto_platform_base.AutoTestPlatformBase