Update CI configuration to support multiple OS environments (#708)

Signed-off-by: DanielAvdar <66269169+DanielAvdar@users.noreply.github.com>
This commit is contained in:
Daniel Avdar 2025-05-14 15:43:59 +03:00 • committed by GitHub
commit b8f7b027c3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,5 +1,7 @@
"""Tests for example servers"""
import sys
import pytest
from pytest_examples import CodeExample, EvalExample, find_examples
@ -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)