Skip to content

Commit 1894d89

Browse files
springdomcaptivit
authored andcommitted
Fix CI: skip email forwarder tests when requests is not installed
The email forwarder is a standalone script with its own dependency on `requests`, which is not part of the core backend deps. Use pytest.importorskip to gracefully skip the test module in CI.
1 parent 9da9c2f commit 1894d89

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/test_email_forwarder.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
from email.mime.text import MIMEText
88
from unittest.mock import MagicMock, patch
99

10+
import pytest
11+
12+
# The email forwarder is a standalone script that depends on `requests`,
13+
# which is not a core backend dependency. Skip the entire module if missing.
14+
pytest.importorskip("requests", reason="requests is required for email forwarder tests")
15+
1016
# Add the forwarder script to the path
1117
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "scripts", "email_forwarder"))
1218

0 commit comments

Comments
 (0)