pytest-csv-params/_ptcsvp/configure.py

21 lines
469 B
Python
Raw Normal View History

2022-08-14 22:01:28 +02:00
"""
Pytest Plugin Configuration
"""
from _pytest.config import Config
2022-08-14 22:01:28 +02:00
from _ptcsvp.plugin import Plugin
def pytest_configure(config: Config, plugin_name="csv_params") -> None:
2022-08-14 22:01:28 +02:00
"""
Register our Plugin
"""
config.pluginmanager.register(Plugin(config), f"{plugin_name}_plugin")
def pytest_unconfigure(config: Config, plugin_name="csv_params") -> None:
2022-08-14 22:01:28 +02:00
"""
Remove our Plugin
"""
config.pluginmanager.unregister(f"{plugin_name}_plugin")