Files
python_parser/tests/conftest.py
2025-09-04 18:56:36 +03:00

28 lines
745 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""
Конфигурация pytest для тестов парсеров
"""
import pytest
import sys
import os
# Добавляем путь к проекту
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', 'python_parser'))
@pytest.fixture(scope="session")
def test_data_dir():
"""Путь к директории с тестовыми данными"""
return os.path.join(os.path.dirname(__file__), 'test_data')
@pytest.fixture
def mock_data():
"""Моковые данные для тестов"""
return {
'SNPZ': {
'data': 'test_data',
'records_count': 10
},
'KNPZ': {
'data': 'test_data_2',
'records_count': 5
}
}