Skip to content

Commit

Permalink
Fix parts snippet tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jardon committed Mar 1, 2024
1 parent 267c2f3 commit 6ce8e13
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions tests/unit/extensions/test_qt_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,22 +249,27 @@ def test_get_part_snippet(qt_framework_extension):


@pytest.mark.parametrize(fixture_variables, base_values)
def test_get_parts_snippet(qt_framework_extension, name):
def test_get_parts_snippet_without_external_sdk(qt_framework_extension, name):
assert qt_framework_extension.get_parts_snippet() == {}


@pytest.mark.parametrize(fixture_variables, builtin_stable_values)
def test_get_parts_snippet_with_external_sdk(qt_framework_extension, name):
sdk_snap = qt_framework_extension.qt_snaps.sdk["snap"]
sdk_channel = qt_framework_extension.qt_snaps.sdk["channel"]

assert qt_framework_extension.get_parts_snippet() == {
f"{name}/sdk": {"plugin": "nil", "stage-snaps": [f"{sdk_snap}/{sdk_channel}"]}
f"{name}/sdk": {"plugin": "nil", "build-snaps": [f"{sdk_snap}/{sdk_channel}"]}
}


@pytest.mark.parametrize(fixture_variables, builtin_stable_values)
def test_get_parts_snippet_with_external_sdk(qt_framework_extension, name):
assert qt_framework_extension.get_parts_snippet() == {}


@pytest.mark.parametrize(fixture_variables, builtin_edge_values)
def test_get_parts_snippet_with_external_sdk_different_channel(
qt_framework_extension, name
):
assert qt_framework_extension.get_parts_snippet() == {}
sdk_snap = qt_framework_extension.qt_snaps.sdk["snap"]
sdk_channel = qt_framework_extension.qt_snaps.sdk["channel"]

assert qt_framework_extension.get_parts_snippet() == {
f"{name}/sdk": {"plugin": "nil", "build-snaps": [f"{sdk_snap}/{sdk_channel}"]}
}

0 comments on commit 6ce8e13

Please sign in to comment.