Skip to content

Commit f2c7889

Browse files
catch runtime error
1 parent 66c226d commit f2c7889

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/conftest.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818

1919
try:
2020
from starlette.testclient import TestClient
21-
except ImportError:
21+
# Catch RuntimeError to prevent the following exception in aws_lambda tests.
22+
# RuntimeError: The starlette.testclient module requires the httpx package to be installed.
23+
except (ImportError, RuntimeError):
2224
TestClient = None
2325

2426
try:

0 commit comments

Comments
 (0)