Skip to content

Commit

Permalink
Suppress windows relpath exception
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Oct 22, 2024
1 parent abc5c1e commit d8ad95e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ env:
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version:
Expand Down
4 changes: 3 additions & 1 deletion pytest_github_actions_annotate_failures/plugin.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

from __future__ import annotations

import contextlib
import os
import sys
from typing import TYPE_CHECKING
Expand Down Expand Up @@ -111,7 +112,8 @@ def pytest_warning_recorded(self, warning_message, when, nodeid, location): # n
if not rel_path.startswith(".."):
filesystempath = rel_path
else:
filesystempath = os.path.relpath(filesystempath)
with contextlib.suppress(ValueError):
filesystempath = os.path.relpath(filesystempath)

workflow_command = _build_workflow_command(
"warning",
Expand Down

0 comments on commit d8ad95e

Please sign in to comment.