Skip to content

Commit d8574d5

Browse files
test added;
1 parent 5556219 commit d8574d5

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

tests/inference/test_inference_api.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,20 @@ def test_invalid_limit_raises(self, monkeypatch, tmp_path):
263263
limit=1.5, # float out of (0, 1]
264264
)
265265

266+
def test_negative_limit_raises(self, monkeypatch, tmp_path):
267+
self._patch_session(monkeypatch)
268+
qpath, tpath, outpath = _make_fixtures(tmp_path)
269+
270+
with pytest.raises(ValueError):
271+
inference_api(
272+
model_name="dummy",
273+
base_url="http://localhost:9999/v1",
274+
output_file=str(outpath),
275+
questions_path=str(qpath),
276+
tables_path=str(tpath),
277+
limit=-10, # float out of (0, 1]
278+
)
279+
266280
def test_api_key_set_in_header(self, monkeypatch, tmp_path):
267281
"""Authorization header must be forwarded to the session."""
268282
captured_headers: dict = {}

0 commit comments

Comments
 (0)