Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,6 @@ max-complexity = 17
"S106", # Possible hardcoded password assigned to argument
"ARG001", # Unused function argument
"ARG002", # Unused method argument
"PT006", # Wrong type passed to first argument of `pytest.mark.parametrize`; expected `tuple`
"PT011", # `pytest.raises(ValueError)` is too broad, set the `match` parameter or use a more specific exception
"PT012", # `pytest.raises()` block should contain a single simple statement
]
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/ctl/test_render_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def test_validate_template_not_found(test_case: RenderAppFailure, httpx_mock: HT


@pytest.mark.parametrize(
"cli_branch,env_branch,from_git,expected_branch",
("cli_branch", "env_branch", "from_git", "expected_branch"),
[
("cli-branch", None, False, "cli-branch"),
(None, "env-branch", False, "env-branch"),
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/sdk/spec/test_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ async def test_validate_object_expansion_multiple_ranges_bad_syntax(
]


@pytest.mark.parametrize("data,is_valid,format", get_relationship_info_testdata)
@pytest.mark.parametrize(("data", "is_valid", "format"), get_relationship_info_testdata)
async def test_get_relationship_info_tags(
client_with_schema_01: InfrahubClient,
data: dict | list,
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/sdk/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ async def test_method_all_multiple_pages(
assert len(repos) == 5


@pytest.mark.parametrize("client_type, use_parallel", batch_client_types)
@pytest.mark.parametrize(("client_type", "use_parallel"), batch_client_types)
async def test_method_all_batching(
clients: BothClients,
mock_query_location_batch_count: HTTPXMock,
Expand Down
4 changes: 3 additions & 1 deletion tests/unit/sdk/test_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ async def test_validate_method_signature(
)


@pytest.mark.parametrize("hfid,expected_kind,expected_hfid", [("BuiltinLocation__JFK1", "BuiltinLocation", ["JFK1"])])
@pytest.mark.parametrize(
("hfid", "expected_kind", "expected_hfid"), [("BuiltinLocation__JFK1", "BuiltinLocation", ["JFK1"])]
)
def test_parse_human_friendly_id(hfid: str, expected_kind: str, expected_hfid: list[str]) -> None:
kind, hfid = parse_human_friendly_id(hfid)
assert kind == expected_kind
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/sdk/test_query_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ async def test_get_variables(query_01: str, query_04: str, query_05: str, query_


@pytest.mark.parametrize(
"var_type,var_required",
("var_type", "var_required"),
[("[ID]", False), ("[ID]!", True), ("[ID!]", False), ("[ID!]!", True)],
)
async def test_get_nested_variables(var_type: str, var_required: bool) -> None:
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/sdk/test_timestamp.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def test_parse_string() -> None:


@pytest.mark.parametrize(
"input_str,expected_datetime",
("input_str", "expected_datetime"),
[
pytest.param(
"2022-01-01T10:01:01.123000Z", datetime(2022, 1, 1, 10, 1, 1, 123000, tzinfo=UTC), id="milliseconds"
Expand All @@ -69,7 +69,7 @@ def test_to_datetime(input_str: str, expected_datetime: datetime) -> None:


@pytest.mark.parametrize(
"input_str,expected_str,expected_str_no_z",
("input_str", "expected_str", "expected_str_no_z"),
[
pytest.param(
"2022-01-01T10:01:01.123000Z",
Expand Down