Skip to content

Commit 7db45ed

Browse files
author
Tom Softreck
committed
update
1 parent 056ff63 commit 7db45ed

2 files changed

Lines changed: 56 additions & 8 deletions

File tree

pytest.ini

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,53 @@ python_files = test_*.py
44
python_classes = Test*
55
python_functions = test_*
66
asyncio_mode = auto
7-
addopts = --strict-markers --disable-warnings
7+
8+
# Test execution options
9+
addopts =
10+
-v # Verbose output
11+
--strict-markers # Ensure markers are registered
12+
--disable-warnings # Disable warnings in output
13+
--durations=10 # Show 10 slowest tests
14+
--cov=src/dialogchain # Enable coverage
15+
--cov-report=term-missing # Show missing lines in coverage
16+
--cov-report=xml:coverage.xml # Generate coverage XML report
17+
-p no:warnings # Don't show warnings summary
18+
19+
# Markers for test categorization
20+
markers =
21+
slow: marks tests as slow (deselect with '-m "not slow"')
22+
integration: marks integration tests (run with '-m integration')
23+
unit: marks unit tests (run with '-m unit')
24+
network: tests that require network access
25+
26+
# Configure logging
27+
log_cli = true
28+
log_cli_level = INFO
29+
log_cli_format = %(asctime)s [%(levelname)8s] %(message)s (%(filename)s:%(lineno)s)
30+
log_cli_date_format = %Y-%m-%d %H:%M:%S
31+
32+
# Coverage configuration
33+
[tool:pytest]
34+
testpaths = tests
35+
python_files = test_*.py
36+
python_classes = Test*
37+
python_functions = test_*
38+
39+
[coverage:run]
40+
source = src
41+
branch = true
42+
omit =
43+
**/tests/*
44+
**/__init__.py
45+
**/version.py
46+
47+
[coverage:report]
48+
exclude_lines =
49+
pragma: no cover
50+
def __repr__
51+
if self.debug:
52+
raise NotImplementedError
53+
if 0:
54+
if __name__ == .__main__.:
55+
raise ImportError
56+
except ImportError

tests/integration/test_http_connector.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
"""
2-
Integration tests for HTTP connector using mock endpoints
3-
"""
4-
import pytest
5-
import asyncio
1+
"""Integration tests for HTTP connector using mock endpoints."""
2+
3+
from unittest.mock import MagicMock, patch
4+
65
import aiohttp
7-
import json
6+
import pytest
87
from aiohttp import web
9-
from unittest.mock import patch, MagicMock
8+
109
from dialogchain.connectors import HTTPDestination
1110

1211

0 commit comments

Comments
 (0)