Skip to content

Commit 7ad8616

Browse files
committed
Skip guardrail test for python<=3.8
1 parent 8b84923 commit 7ad8616

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tests/unitary/with_extras/langchain/test_guardrails.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
import sys
1111
from typing import Any, List, Dict, Mapping, Optional
1212
from unittest import TestCase
13+
import pytest
14+
15+
pytestmark = pytest.mark.skipif(
16+
sys.version_info < (3, 9), reason="Requires Python 3.9 or higher"
17+
)
18+
1319
from langchain.callbacks.manager import CallbackManagerForLLMRun
1420
from langchain.llms.base import LLM
1521
from langchain.prompts import PromptTemplate
@@ -18,9 +24,6 @@
1824
from ads.llm.guardrails.base import BlockedByGuardrail, GuardrailIO
1925
from ads.llm.chain import GuardrailSequence
2026
from ads.llm.serialize import load, dump
21-
import pytest
22-
23-
pytestmark = pytest.mark.skipif(sys.version_info < (3, 9), reason="Requires Python 3.9 or higher")
2427

2528

2629
class FakeLLM(LLM):

0 commit comments

Comments
 (0)