summaryrefslogtreecommitdiffstats
path: root/library/python/pytest/ut/conftest_non_local/tests/conftest.py
blob: 4567ed87e43877e1d4c5e2b8932d231805be19c0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
"""
This conftest SHOULD be counted an initial conftest, see
https://docs.pytest.org/en/stable/how-to/writing_plugins.html#pluginorder

This is because this conftest is located in the directory of the test module.
"""

import pytest


def pytest_configure(config):
    config._my_conftests = getattr(config, '_my_conftests', []) + ['conftest_non_local/tests/conftest.py']


def pytest_sessionstart(session):
    session._my_conftests = getattr(session, '_my_conftests', []) + ['conftest_non_local/tests/conftest.py']


@pytest.fixture
def fixture_order(fixture_order):
    return fixture_order + ['conftest_non_local/tests/conftest.py']