initial commit
This commit is contained in:
parent
b84bd80842
commit
9411fe61ee
11 changed files with 272 additions and 1 deletions
20
src/tests_wordpress/conftest.py
Normal file
20
src/tests_wordpress/conftest.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
from dotenv import dotenv_values
|
||||
|
||||
|
||||
def pytest_addoption(parser):
|
||||
parser.addoption(
|
||||
"--env_file_path",
|
||||
action="store",
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def config(request):
|
||||
dotenv_path = request.config.getoption("--env_file_path")
|
||||
dotenv_path = Path(dotenv_path)
|
||||
assert dotenv_path.is_file()
|
||||
config = dotenv_values(dotenv_path)
|
||||
return config
|
||||
Loading…
Add table
Add a link
Reference in a new issue