<commit_before># -*- coding: utf-8 -*-
import pytest
import json
from fixture.application import Application

fixture = None
target = None


@pytest.fixture
def app(request):
    global fixture
    global target
    if target is None:
        with open(request.config.getoption("--target")) as config_file:
            target = json.load(config_file)
    if fixture is None or not fixture.is_valid():
            fixture = Application(browser=target["browser"]["type"], base_url=target["base_url"])
    fixture.session.ensure_login(email=target["userEmail"], password=target["userPassword"])
    return fixture


@pytest.fixture(scope="session", autouse=True)
def stop(request):<commit_msg>Добавлен поиск конфиг файла по относительному пути<commit_after># -*- coding: utf-8 -*-
import pytest
import json
import os.path
from fixture.application import Application

fixture = None
target = None


@pytest.fixture
def app(request):
    global fixture
    global target
    if target is None:
        config_file = os.path.join(os.path.dirname(os.path.abspath(__file__)), request.config.getoption("--target"))
        with open(config_file) as f:
            target = json.load(f)
    if fixture is None or not fixture.is_valid():
            fixture = Application(browser=target["browser"]["type"], base_url=target["base_url"])
    fixture.session.ensure_login(email=target["userEmail"], password=target["userPassword"])
    return fixture


@pytest.fixture(scope="session", autouse=True)
def stop(request):
{'fraction_non_alphanumeric': 0.12300531914893617, 'fraction_numerical': 0.0013297872340425532, 'mean_word_length': 4.154109589041096, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '444274', 'n_tokens_mistral': 441, 'n_tokens_neox': 452, 'n_words': 110}