Skip to content

Commit b3ee2e3

Browse files
committed
fix(tests): skip langmem tests on Python 3.10
Add Python version check to skip langmem serialization tests on Python < 3.11. The langmem library uses typing.NotRequired which was introduced in Python 3.11, causing import failures on Python 3.10 in CI. Tests will: - Skip on Python 3.10 (379 tests run) - Run on Python 3.11+ (382 tests run) Fixes CI test collection failures on Python 3.10.
1 parent a24a825 commit b3ee2e3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/test_langmem_serialization.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
"""Integration tests for langmem object serialization with JsonPlusRedisSerializer."""
22

3+
import sys
4+
35
import pytest
6+
7+
# langmem requires Python 3.11+ (uses typing.NotRequired)
8+
pytestmark = pytest.mark.skipif(
9+
sys.version_info < (3, 11),
10+
reason="langmem requires Python 3.11+ (uses typing.NotRequired)",
11+
)
12+
413
from langmem.short_term.summarization import RunningSummary
514

615
from langgraph.checkpoint.redis.jsonplus_redis import JsonPlusRedisSerializer

0 commit comments

Comments
 (0)