aboutsummaryrefslogtreecommitdiffstats
path: root/ydb/tests/oss/canonical/conftest.py
blob: 8d1626c29a05fbe8c0b07f324d805b487c94123c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
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('::')
    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])