Skip to content

Commit 5fc8f20

Browse files
authored
fix(NGUI-386): Improve pytest configuration to fail on unknown marker and fix missing deps (#178)
1 parent 78fc86b commit 5fc8f20

File tree

7 files changed

+18
-5
lines changed

7 files changed

+18
-5
lines changed

libs/next_gen_ui_agent/BUILD

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ python_tests(
1616
sources=[
1717
"**/*_test.py",
1818
],
19-
dependencies=[":lib", ":test_resources"],
19+
dependencies=[
20+
":lib",
21+
":test_resources",
22+
"libs/3rdparty/python:pytest",
23+
],
2024
)
2125

2226
resources(

libs/next_gen_ui_agent/component_selection_test.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,14 @@ async def test_component_selection_run_OK() -> None:
6262
llm = FakeMessagesListChatModel(responses=[msg]) # type: ignore
6363
inference = LangChainModelInference(llm)
6464

65-
component_selection = OnestepLLMCallComponentSelectionStrategy(False)
65+
component_selection = OnestepLLMCallComponentSelectionStrategy(
66+
input_data_json_wrapping=False
67+
)
6668
result = await component_selection.component_selection_run(
6769
inference, user_input, input_data
6870
)
6971
assert result.component == "one-card"
70-
# assert json_data are not wrapped even it is enabled and type is provided, as there is only one item in the array
72+
# assert json_data are not wrapped as it is disabled
7173
assert result.json_data == json.loads(movies_data)
7274

7375

libs/next_gen_ui_langgraph/BUILD

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ python_sources(
66
# This target sets the metadata for all the Python test files in this directory.
77
python_tests(
88
name="tests",
9+
dependencies=[
10+
"libs/3rdparty/python:pytest",
11+
],
912
)
1013

1114
# This target allows us to build a `.whl` bdist and a `.tar.gz` sdist by auto-generating

libs/next_gen_ui_llama_stack/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ python_sources(
1212
python_tests(
1313
name="tests",
1414
dependencies=[
15+
"libs/3rdparty/python:pytest",
1516
# Has to be explicitly noted because of missing trans deps in llama-stack-client
1617
"libs/3rdparty/python:llama-stack-client",
1718
],

libs/next_gen_ui_llama_stack_embedded/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ python_sources(
1212
python_tests(
1313
name="tests",
1414
dependencies=[
15+
"libs/3rdparty/python:pytest",
1516
# Has to be explicitly noted because of missing trans deps in llama-stack-client
1617
"libs/3rdparty/python:llama-stack-client",
1718
"libs/3rdparty/python:llama-stack",

pants.ci.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ remote_cache_read = false
99
remote_cache_write = false
1010

1111
[pytest]
12-
args = ["-vv", "--no-header"]
12+
args = ["--no-header", "-vv", "--strict-markers"]
13+
execution_slot_var = "TEST_EXECUTION_SLOT"
14+
requirements = ["//libs/3rdparty/python:pytest"]
1315

1416
[tailor]
1517
ignore_paths = [

pants.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ ignore_paths = [
5555
]
5656

5757
[pytest]
58-
args = ["--no-header", "-vv"]
58+
args = ["--no-header", "-vv", "--strict-markers"]
5959
execution_slot_var = "TEST_EXECUTION_SLOT"
6060
requirements = ["//libs/3rdparty/python:pytest"]
6161

0 commit comments

Comments
 (0)