Skip to content

Commit

Permalink
test: fix expected 'bad architecture' message
Browse files Browse the repository at this point in the history
  • Loading branch information
tigarmo committed Jan 29, 2025
1 parent 17a2491 commit 6f1048a
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions tests/unit/test_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,17 @@ class DevelProject(Project):
base: str # type: ignore


@pytest.fixture()
@pytest.fixture
def yaml_data():
return ROCKCRAFT_YAML


@pytest.fixture()
@pytest.fixture
def yaml_loaded_data():
return yaml.safe_load(ROCKCRAFT_YAML)


@pytest.fixture()
@pytest.fixture
def pebble_part() -> dict[str, Any]:
return {
"pebble": {
Expand Down Expand Up @@ -425,15 +425,13 @@ def reload_project_platforms(new_platforms=None):
mock_platforms = {
"mock": {"build-on": ["arm64a", "noarch"], "build-for": ["amd64"]}
}
assert (
"Invalid architecture: 'arm64a' must be a valid debian architecture."
in reload_project_platforms(mock_platforms)
assert "'arm64a' is not a valid DebianArchitecture" in reload_project_platforms(
mock_platforms
)

mock_platforms = {"mock": {"build-on": ["arm64", "arm64"], "build-for": ["noarch"]}}
assert (
"Invalid architecture: 'noarch' must be a valid debian architecture."
in reload_project_platforms(mock_platforms)
assert "'noarch' is not a valid DebianArchitecture" in reload_project_platforms(
mock_platforms
)


Expand Down

0 comments on commit 6f1048a

Please sign in to comment.