Skip to content

Commit d543fc4

Browse files
committed
Fix linting
1 parent 6b4f8c1 commit d543fc4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ldai/testing/test_model_config.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from ldclient import Config, Context, LDClient
33
from ldclient.integrations.test_data import TestData
44

5-
from ldai.client import AIConfig, ModelConfig, LDAIClient, LDMessage
5+
from ldai.client import AIConfig, LDAIClient, LDMessage, ModelConfig
66
from ldai.tracker import LDAIConfigTracker
77

88

@@ -112,6 +112,7 @@ def test_model_config_interpolation(ldai_client: LDAIClient, tracker):
112112
assert config.prompt[0].content == 'Hello, World!'
113113
assert config.enabled is True
114114

115+
assert config.model is not None
115116
assert config.model.id == 'fakeModel'
116117
assert config.model.temperature == 0.5
117118
assert config.model.max_tokens == 4096
@@ -128,6 +129,7 @@ def test_model_config_no_variables(ldai_client: LDAIClient, tracker):
128129
assert config.prompt[0].content == 'Hello, !'
129130
assert config.enabled is True
130131

132+
assert config.model is not None
131133
assert config.model.id == 'fakeModel'
132134
assert config.model.temperature == 0.5
133135
assert config.model.max_tokens == 4096
@@ -147,6 +149,7 @@ def test_context_interpolation(ldai_client: LDAIClient, tracker):
147149
assert config.prompt[0].content == 'Hello, Sandy!'
148150
assert config.enabled is True
149151

152+
assert config.model is not None
150153
assert config.model.id == 'fakeModel'
151154
assert config.model.temperature is None
152155
assert config.model.max_tokens is None
@@ -168,6 +171,7 @@ def test_model_config_multiple(ldai_client: LDAIClient, tracker):
168171
assert config.prompt[1].content == 'The day is, Monday!'
169172
assert config.enabled is True
170173

174+
assert config.model is not None
171175
assert config.model.id == 'fakeModel'
172176
assert config.model.temperature == 0.7
173177
assert config.model.max_tokens == 8192
@@ -179,6 +183,7 @@ def test_model_config_disabled(ldai_client: LDAIClient, tracker):
179183

180184
config = ldai_client.model_config('off-config', context, default_value, {})
181185

186+
assert config.model is not None
182187
assert config.enabled is False
183188
assert config.model.id == 'fakeModel'
184189
assert config.model.temperature == 0.1

0 commit comments

Comments
 (0)