Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@ jobs:
run: uv run --no-sync pyright

test:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
os: [ubuntu-latest, windows-latest]

steps:
- uses: actions/checkout@v4
Expand Down
13 changes: 11 additions & 2 deletions tests/test_examples.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""Tests for example servers"""

import sys

import pytest
from pytest_examples import CodeExample, EvalExample, find_examples

Expand Down Expand Up @@ -69,8 +71,15 @@ async def test_desktop(monkeypatch):
content = result.contents[0]
assert isinstance(content, TextResourceContents)
assert isinstance(content.text, str)
assert "/fake/path/file1.txt" in content.text
assert "/fake/path/file2.txt" in content.text
if sys.platform == "win32":
file_1 = "/fake/path/file1.txt".replace("/", "\\\\") # might be a bug
file_2 = "/fake/path/file2.txt".replace("/", "\\\\") # might be a bug
assert file_1 in content.text
assert file_2 in content.text
# might be a bug, but the test is passing
else:
assert "/fake/path/file1.txt" in content.text
assert "/fake/path/file2.txt" in content.text


@pytest.mark.parametrize("example", find_examples("README.md"), ids=str)
Expand Down
Loading