Skip to content

Commit c95adf3

Browse files
committed
chore: Change casing on test case names.
1 parent 57e29c9 commit c95adf3

File tree

4 files changed

+13
-17
lines changed

4 files changed

+13
-17
lines changed

Diff for: agntcy_iomapper/base.py

-4
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,6 @@ class BaseIOMapper(ABC):
6767
All io mappers wrappers inherited from BaseIOMapper.
6868
"""
6969

70-
#
71-
# def __init__(self, *args: Any, **kwargs: Any) -> None:
72-
# super().__init__(*args, **kwargs)
73-
7470
@abstractmethod
7571
def invoke(self, input: IOMapperInput) -> IOMapperOutput:
7672
"""Pass input data

Diff for: tests/conftest.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,31 @@
99
load_dotenv(dotenv_path=find_dotenv(usecwd=True))
1010

1111
@pytest.fixture
12-
def jinjaEnv() -> SandboxedEnvironment:
12+
def jinja_env() -> SandboxedEnvironment:
1313
return SandboxedEnvironment(
1414
loader=None,
1515
enable_async=False,
1616
autoescape=False,
1717
)
1818

1919
@pytest.fixture
20-
def jinjaEnvAsync() -> SandboxedEnvironment:
20+
def jinja_env_async() -> SandboxedEnvironment:
2121
return SandboxedEnvironment(
2222
loader=None,
2323
enable_async=True,
2424
autoescape=False,
2525
)
2626

2727
@pytest.fixture
28-
def noLlmIOMapperConfig() -> IOMapperConfig:
28+
def no_llm_iomapper_config() -> IOMapperConfig:
2929
return IOMapperConfig(
3030
models = {},
3131
validate_json_input=True,
3232
validate_json_output=True,
3333
)
3434

3535
@pytest.fixture
36-
def llmIOMapperConfig() -> IOMapperConfig:
36+
def llm_iomapper_config() -> IOMapperConfig:
3737
return IOMapperConfig(
3838
models={
3939
"azure:gpt-4o-mini": IOModelArgs(

Diff for: tests/test_simple.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
from agntcy_iomapper import IOMapper, IOMapperInput, IOMapperOutput
88
from agntcy_iomapper.base import ArgumentsDescription
9-
from utils import compareOutputs, compareOutputsAsync
9+
from utils import compare_outputs, compare_outputs_async
1010

1111
SIMPLE_TEST_PARAMETERS = [
1212
(
@@ -108,11 +108,11 @@
108108
"input, expected_output", SIMPLE_TEST_PARAMETERS,
109109
)
110110
@pytest.mark.llm
111-
async def test_simple_mapping_async(llmIOMapperConfig, jinjaEnvAsync, input, expected_output):
112-
llmIOMapper = IOMapper(llmIOMapperConfig, jinja_env_async=jinjaEnvAsync)
111+
async def test_simple_mapping_async(llm_iomapper_config, jinja_env_async, input, expected_output):
112+
llmIOMapper = IOMapper(llm_iomapper_config, jinja_env_async=jinja_env_async)
113113
output = await llmIOMapper.ainvoke(input)
114114
if isinstance(output.data, str):
115-
equalp = await compareOutputsAsync(llmIOMapper, output.data, expected_output.data)
115+
equalp = await compare_outputs_async(llmIOMapper, output.data, expected_output.data)
116116
assert equalp
117117
return
118118

@@ -125,11 +125,11 @@ async def test_simple_mapping_async(llmIOMapperConfig, jinjaEnvAsync, input, exp
125125
"input, expected_output", SIMPLE_TEST_PARAMETERS,
126126
)
127127
@pytest.mark.llm
128-
def test_simple_mapping(llmIOMapperConfig, jinjaEnv, input, expected_output):
129-
llmIOMapper = IOMapper(llmIOMapperConfig, jinja_env=jinjaEnv)
128+
def test_simple_mapping(llm_iomapper_config, jinja_env, input, expected_output):
129+
llmIOMapper = IOMapper(llm_iomapper_config, jinja_env=jinja_env)
130130
output = llmIOMapper.invoke(input)
131131
if isinstance(output.data, str):
132-
equalp = compareOutputs(llmIOMapper, output.data, expected_output.data)
132+
equalp = compare_outputs(llmIOMapper, output.data, expected_output.data)
133133
assert equalp
134134
return
135135

Diff for: tests/utils.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
Reasoning
2525
"""
2626

27-
async def compareOutputsAsync(iomapper: IOMapper, text1: str, text2: str) -> bool:
27+
async def compare_outputs_async(iomapper: IOMapper, text1: str, text2: str) -> bool:
2828
model_name = iomapper.config.default_model
2929
agent = get_supported_agent(
3030
True,
@@ -38,7 +38,7 @@ async def compareOutputsAsync(iomapper: IOMapper, text1: str, text2: str) -> boo
3838
match = matches.group(1)
3939
return match is not None and match.startswith("t")
4040

41-
def compareOutputs(iomapper: IOMapper, text1: str, text2: str) -> bool:
41+
def compare_outputs(iomapper: IOMapper, text1: str, text2: str) -> bool:
4242
model_name = iomapper.config.default_model
4343
agent = get_supported_agent(
4444
False,

0 commit comments

Comments
 (0)