cleanup
This commit is contained in:
parent
d483bf3a0f
commit
ad95ed649f
1 changed files with 3 additions and 12 deletions
|
|
@ -9,17 +9,9 @@ from pathlib import Path
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from dotenv import dotenv_values
|
from dotenv import dotenv_values
|
||||||
from icecream import ic
|
|
||||||
from playwright.sync_api import BrowserContext
|
|
||||||
|
|
||||||
from src.dirmanager import DirManager
|
from src.dirmanager import DirManager
|
||||||
|
|
||||||
# pytest_plugins = [
|
|
||||||
# "setup.setup_authentik",
|
|
||||||
# "src.tests_authentik.authentik_plugin"
|
|
||||||
# ]
|
|
||||||
|
|
||||||
|
|
||||||
TIMEOUT = 5000
|
TIMEOUT = 5000
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -56,7 +48,7 @@ def dotenv_config(request) -> dict[str, str]:
|
||||||
assert dotenv_path is not None, "required pytest command line argument not given"
|
assert dotenv_path is not None, "required pytest command line argument not given"
|
||||||
dotenv_path = Path(dotenv_path)
|
dotenv_path = Path(dotenv_path)
|
||||||
assert dotenv_path.is_file()
|
assert dotenv_path.is_file()
|
||||||
return dotenv_values(dotenv_path)
|
return dotenv_values(dotenv_path) # type: ignore
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope="session", autouse=True)
|
@pytest.fixture(scope="session", autouse=True)
|
||||||
|
|
@ -75,11 +67,10 @@ def RESULTS(dirmanager) -> Path:
|
||||||
return dirmanager.RESULTS
|
return dirmanager.RESULTS
|
||||||
|
|
||||||
|
|
||||||
# log failed tests
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.hookimpl(tryfirst=True, hookwrapper=True)
|
@pytest.hookimpl(tryfirst=True, hookwrapper=True)
|
||||||
def pytest_runtest_makereport(item, call):
|
def pytest_runtest_makereport(item, call):
|
||||||
|
"""saves traceback when test fails"""
|
||||||
|
|
||||||
# execute all other hooks to obtain the report object
|
# execute all other hooks to obtain the report object
|
||||||
outcome = yield
|
outcome = yield
|
||||||
rep = outcome.get_result()
|
rep = outcome.get_result()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue