Some test suites have own test runners based on pytest, and they don't need all stuff we use for test.py. Move all code related to test.py framework to test/pylib/runner.py and use it as a plugin conditionally (by using TEST_RUNNER variable.)
26 lines
504 B
Python
26 lines
504 B
Python
#
|
|
# Copyright (C) 2024-present ScyllaDB
|
|
#
|
|
# SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.0
|
|
#
|
|
|
|
import pytest
|
|
|
|
from test import TEST_RUNNER
|
|
from test.pylib.report_plugin import ReportPlugin
|
|
|
|
|
|
pytest_plugins = []
|
|
|
|
|
|
if TEST_RUNNER == "runpy":
|
|
@pytest.fixture(scope="session")
|
|
def testpy_test() -> None:
|
|
return None
|
|
else:
|
|
pytest_plugins.append("test.pylib.runner")
|
|
|
|
|
|
def pytest_configure(config: pytest.Config) -> None:
|
|
config.pluginmanager.register(ReportPlugin())
|