Skip to content

Commit d19d56b

Browse files
Mark slow tests with pytest.mark.slow to prevent CI timeouts
Co-authored-by: MarcSkovMadsen <42288570+MarcSkovMadsen@users.noreply.github.com>
1 parent 22f7330 commit d19d56b

3 files changed

Lines changed: 15 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ jobs:
113113
- name: Install repository
114114
run: pixi run -e ${{ matrix.environment }} postinstall
115115
- name: Run pytest
116-
run: pixi run -e ${{ matrix.environment }} test-coverage --color=yes
116+
run: pixi run -e ${{ matrix.environment }} test-coverage --color=yes -m "not slow" --ignore=tests/ui
117117

118118
pytest_ui:
119119
name: ui:${{ matrix.environment }}:${{ matrix.os }}

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,10 @@ filterwarnings = [
170170
"ignore::UserWarning",
171171
]
172172
testpaths = ["tests"]
173+
markers = [
174+
"slow: marks tests as slow (e.g., tests that clone repos or build large indexes)",
175+
"integration: marks tests as integration tests",
176+
]
173177

174178
[tool.mypy]
175179
python_version = '3.11'

tests/docs_mcp/test_docs_mcp.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ async def test_skills_resource():
1919
assert result.data
2020

2121

22-
@pytest.mark.skip(reason="this test is very slow")
22+
@pytest.mark.slow
2323
@pytest.mark.asyncio
2424
async def test_update_index():
2525
"""Test the update_index tool."""
@@ -29,6 +29,7 @@ async def test_update_index():
2929
assert result.data
3030

3131

32+
@pytest.mark.slow
3233
@pytest.mark.asyncio
3334
async def test_list_projects():
3435
"""Test that all projects are listed correctly."""
@@ -40,6 +41,7 @@ async def test_list_projects():
4041
assert "panel" in result.data
4142

4243

44+
@pytest.mark.slow
4345
@pytest.mark.asyncio
4446
async def test_semantic_search():
4547
"""Test the search tool."""
@@ -63,6 +65,7 @@ async def test_semantic_search():
6365
assert "content" in document
6466

6567

68+
@pytest.mark.slow
6669
@pytest.mark.asyncio
6770
async def test_search_by_project():
6871
"""Test the search tool with project filtering."""
@@ -78,6 +81,7 @@ async def test_search_by_project():
7881
assert document["project"] == "hvplot"
7982

8083

84+
@pytest.mark.slow
8185
@pytest.mark.asyncio
8286
async def test_search_with_custom_max_results():
8387
"""Test the search tool with custom max_results parameter."""
@@ -95,6 +99,7 @@ async def test_search_with_custom_max_results():
9599
assert document["project"] == "panel"
96100

97101

102+
@pytest.mark.slow
98103
@pytest.mark.asyncio
99104
async def test_search_without_content():
100105
"""Test the search tool with content=False for metadata only."""
@@ -116,6 +121,7 @@ async def test_search_without_content():
116121
assert document.get("content") is None
117122

118123

124+
@pytest.mark.slow
119125
@pytest.mark.asyncio
120126
async def test_search_material_ui_specific():
121127
"""Test the search tool with Material UI specific query."""
@@ -131,6 +137,7 @@ async def test_search_material_ui_specific():
131137
assert document["project"] == "panel-material-ui"
132138

133139

140+
@pytest.mark.slow
134141
@pytest.mark.asyncio
135142
async def test_search_empty_query():
136143
"""Test the search tool with edge cases."""
@@ -142,6 +149,7 @@ async def test_search_empty_query():
142149
assert isinstance(result.data, list)
143150

144151

152+
@pytest.mark.slow
145153
@pytest.mark.asyncio
146154
async def test_search_invalid_project():
147155
"""Test the search tool with invalid project name."""
@@ -154,6 +162,7 @@ async def test_search_invalid_project():
154162
assert len(result.data) == 0
155163

156164

165+
@pytest.mark.slow
157166
@pytest.mark.asyncio
158167
async def test_search_with_project_filter():
159168
"""Test the search tool with project filtering."""

0 commit comments

Comments
 (0)