mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-26 19:45:00 +02:00
Fix empty migration (#2978)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
# type: ignore
|
||||
|
||||
import re
|
||||
from contextlib import contextmanager
|
||||
from typing import Any, Optional
|
||||
from uuid import uuid4
|
||||
@@ -782,3 +783,10 @@ def test_scores(
|
||||
|
||||
assert len(results) == 1
|
||||
assert results[0].score == pytest.approx(similarities[0], abs=1e-3)
|
||||
|
||||
|
||||
def test_nonnull_migrations() -> None:
|
||||
_leading_comment_remover = re.compile(r"^/\*.*?\*/")
|
||||
for migration in PostgresStore.MIGRATIONS:
|
||||
statement = _leading_comment_remover.sub("", migration).split()[0]
|
||||
assert statement.strip()
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# type: ignore
|
||||
|
||||
import re
|
||||
from contextlib import contextmanager
|
||||
from typing import Any
|
||||
from uuid import uuid4
|
||||
@@ -238,3 +239,10 @@ def test_null_chars(saver_name: str, test_data) -> None:
|
||||
list(saver.list(None, filter={"my_key": "abc"}))[0].metadata["my_key"]
|
||||
== "abc"
|
||||
)
|
||||
|
||||
|
||||
def test_nonnull_migrations() -> None:
|
||||
_leading_comment_remover = re.compile(r"^/\*.*?\*/")
|
||||
for migration in PostgresSaver.MIGRATIONS:
|
||||
statement = _leading_comment_remover.sub("", migration).split()[0]
|
||||
assert statement.strip()
|
||||
|
||||
Reference in New Issue
Block a user