Skip in py3.8

pull/11175/head
Nuno Campos 11 months ago
parent b8e3e1118d
commit 7bfee012d5

@ -120,7 +120,6 @@ def get_lambda_source(func: Callable) -> Optional[str]:
"""
try:
code = inspect.getsource(func)
print(code)
tree = ast.parse(textwrap.dedent(code))
visitor = GetLambdaSource()
visitor.visit(tree)

@ -1277,7 +1277,8 @@ def test_combining_sequences(
assert chain.first == prompt
assert chain.middle == [chat]
assert chain.last == parser
assert dumps(chain, pretty=True) == snapshot
if sys.version_info >= (3, 9):
assert dumps(chain, pretty=True) == snapshot
prompt2 = (
SystemMessagePromptTemplate.from_template("You are a nicer assistant.")
@ -2101,7 +2102,8 @@ async def test_llm_with_fallbacks(
assert await runnable.ainvoke("hello") == "bar"
assert await runnable.abatch(["hi", "hey", "bye"]) == ["bar"] * 3
assert list(await runnable.ainvoke("hello")) == list("bar")
assert dumps(runnable, pretty=True) == snapshot
if sys.version_info >= (3, 9):
assert dumps(runnable, pretty=True) == snapshot
class FakeSplitIntoListParser(BaseOutputParser[List[str]]):
@ -2744,7 +2746,7 @@ async def test_runnable_branch_abatch() -> None:
@pytest.mark.skipif(
sys.version_info < (3, 9), reason="Requires python version >= 3.9 to run."
)
def test_reprsentation_of_runnables() -> None:
def test_representation_of_runnables() -> None:
"""Test representation of runnables."""
runnable = RunnableLambda(lambda x: x * 2)
assert repr(runnable) == "RunnableLambda(lambda x: x * 2)"

Loading…
Cancel
Save