aboutsummaryrefslogtreecommitdiffstats
path: root/ydb/tests/oss/canonical/conftest.py
blob: 478b461f2cb3e115d5b62ec5b4d16387db5b0f7e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import pytest
from ydb.tests.oss.canonical import canons_meta, is_oss


@pytest.fixture(scope='function', autouse=is_oss)
def set_canondata_directory(request):
    test_info = request.node._nodeid.split('::')
    if len(test_info) > 2:
        test_filename = test_info[0].split('/')[-1][:-3]
        test_classname = test_info[1]
        test_name = test_info[2]
        for c in ['[', ']', '/']:
            test_name = test_name.replace(c, '_')
        canons_meta.directory = '.'.join([test_filename, test_classname, test_name])