This commit is contained in:
2025-09-04 18:56:36 +03:00
parent 847441842c
commit 2555fd80e0
9 changed files with 503 additions and 0 deletions

28
tests/conftest.py Normal file
View File

@@ -0,0 +1,28 @@
"""
Конфигурация 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
}
}