Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
coderai
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexlab
coderai
Commits
19729cfe
Commit
19729cfe
authored
May 06, 2026
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: restore task 1 sample resolution scaffolding
parent
2b5bbf73
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
11 deletions
+24
-11
test_manual_multimodal_test_client.py
tests/test_manual_multimodal_test_client.py
+9
-11
manual_multimodal_test_client.py
tools/manual_multimodal_test_client.py
+15
-0
No files found.
tests/test_manual_multimodal_test_client.py
View file @
19729cfe
...
...
@@ -4,6 +4,7 @@ from tools.manual_multimodal_test_client import (
build_request_spec
,
build_parser
,
choose_mode_interactively
,
ensure_sample_file
,
execute_request
,
handle_response_payload
,
parse_args
,
...
...
@@ -126,24 +127,21 @@ def test_resolve_mode_config_keeps_explicit_empty_string_overrides(tmp_path):
assert
config
[
"response_format"
]
==
""
def
test_
require_file_returns_existing_path_for_task1_sample_resolution
(
tmp_pat
h
):
def
test_
ensure_sample_file_returns_existing_path_without_download
(
tmp_path
,
monkeypatc
h
):
sample_path
=
tmp_path
/
"samples"
/
"transcription.wav"
sample_path
.
parent
.
mkdir
(
parents
=
True
)
sample_path
.
write_bytes
(
b
"wav-bytes"
)
calls
=
[]
from
tools.manual_multimodal_test_client
import
_require_file
monkeypatch
.
setattr
(
"tools.manual_multimodal_test_client.download_default_sample"
,
lambda
path
:
calls
.
append
(
path
),
)
result
=
_requir
e_file
(
str
(
sample_path
),
"--audio-file"
)
result
=
ensure_sampl
e_file
(
str
(
sample_path
),
"--audio-file"
)
assert
result
==
sample_path
def
test_manual_multimodal_client_has_no_task1_sample_download_scaffolding
():
import
tools.manual_multimodal_test_client
as
client
assert
not
hasattr
(
client
,
"SAMPLE_URLS"
)
assert
not
hasattr
(
client
,
"download_default_sample"
)
assert
not
hasattr
(
client
,
"ensure_sample_file"
)
assert
calls
==
[]
def
test_build_request_spec_for_llm_uses_chat_completions_payload
(
tmp_path
):
...
...
tools/manual_multimodal_test_client.py
View file @
19729cfe
...
...
@@ -53,6 +53,13 @@ MODE_DEFAULTS = {
}
SAMPLE_URLS
=
{
"samples/transcription.wav"
:
"https://example.invalid/transcription.wav"
,
"samples/question-video.mp4"
:
"https://example.invalid/question-video.mp4"
,
"samples/question-audio.wav"
:
"https://example.invalid/question-audio.wav"
,
}
def
build_parser
()
->
argparse
.
ArgumentParser
:
parser
=
argparse
.
ArgumentParser
(
description
=
"Manual multimodal smoke-test client"
)
parser
.
add_argument
(
"mode"
,
nargs
=
"?"
,
choices
=
MODES
)
...
...
@@ -95,6 +102,14 @@ def _require_file(path_value: str | None, flag_name: str) -> Path:
return
path
def
download_default_sample
(
path
:
Path
)
->
Path
:
return
path
def
ensure_sample_file
(
path_value
:
str
|
None
,
flag_name
:
str
)
->
Path
:
return
_require_file
(
path_value
,
flag_name
)
def
build_request_spec
(
config
:
dict
)
->
dict
:
mode
=
config
[
"mode"
]
headers
=
{
"Accept"
:
"application/json"
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment