Skip to content

Commit

Permalink
Fix None iteration
Browse files Browse the repository at this point in the history
  • Loading branch information
jardon committed Oct 16, 2024
1 parent de2a11c commit 3467c97
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions snapcraft/extensions/qt_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

from overrides import overrides

from .extension import Extension, get_extensions_data_dir, prepend_to_env
from .extension import Extension, prepend_to_env

_SDK_SNAP = {"core22": "qt-framework-sdk"}

Expand Down Expand Up @@ -219,7 +219,7 @@ def get_parts_snippet(self) -> Dict[str, Any]:
sdk_channel = self.qt_snaps.sdk["channel"]

if self.qt_snaps.builtin:
return None
return {}

return {
f"{self.name}/sdk": {
Expand Down
5 changes: 2 additions & 3 deletions tests/unit/extensions/test_qt_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import pytest

from snapcraft.extensions import qt_framework
from snapcraft.extensions.extension import get_extensions_data_dir
from snapcraft.extensions.qt_framework import _CONTENT_SNAP

############
Expand Down Expand Up @@ -261,11 +260,11 @@ def test_get_parts_snippet(qt_framework_extension, name):

@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() == None
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() == None
assert qt_framework_extension.get_parts_snippet() == {}

0 comments on commit 3467c97

Please sign in to comment.