Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andreas-el committed Apr 4, 2024
1 parent b600d49 commit 1fc3a75
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions tests/test_lint_upgrade_proposals.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,38 @@ def does_not_raise():
1111-12:
python: 3.8.6
"""

VALID_UPGRADE_PROPOSALS_NESTED_ONE_LEVEL = """
1111-12:
wheel:
py38: 0.40.0
py311: 0.40.0
"""

VALID_UPGRADE_PROPOSALS_NESTED_TWO_LEVEL = """
1111-12:
wheel:
rhel7:
py38: 0.40.0
rhel8:
py38: 0.40.0
py311: 0.40.0
"""

VALID_UPGRADE_PROPOSALS_MULTI_NESTED = """
1111-12:
python: 3.8.6
setuptools:
py38: 68.0.0
py311: 68.0.0
wheel:
rhel7:
py38: 0.40.0
rhel8:
py38: 0.40.0
py311: 0.40.0
"""

INVALID_UPGRADE_PROPOSALS_DUPLICATE_PACKAGES = """
1111-11:
1111-12:
Expand Down Expand Up @@ -217,6 +249,24 @@ def does_not_raise():
),
id="repository_file_missing_package_version",
),
pytest.param(
VALID_UPGRADE_PROPOSALS_NESTED_ONE_LEVEL,
VALID_REPOSITORY,
does_not_raise(),
id="one_level_nested_package_versions_in_upgrade_proposals",
),
pytest.param(
VALID_UPGRADE_PROPOSALS_NESTED_TWO_LEVEL,
VALID_REPOSITORY,
does_not_raise(),
id="two_level_nested_package_versions_in_upgrade_proposals",
),
pytest.param(
VALID_UPGRADE_PROPOSALS_MULTI_NESTED,
VALID_REPOSITORY,
does_not_raise(),
id="combined_level_nested_package_versions_in_upgrade_proposals",
),
pytest.param(
INVALID_UPGRADE_PROPOSALS_DUPLICATE_PACKAGES,
VALID_REPOSITORY,
Expand Down

0 comments on commit 1fc3a75

Please sign in to comment.