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
2 changes: 1 addition & 1 deletion add_to_pydotorg.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def get_file_descriptions(
(
"Windows release manifest",
"windows",
False,
v >= (3, 16),
f"Install with 'py install {v[0]}.{v[1]}'",
),
),
Expand Down
25 changes: 25 additions & 0 deletions tests/test_add_to_pydotorg.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,3 +284,28 @@ def test_list_files(fs: FakeFilesystem) -> None:
"Install with 'py install 3.14'",
),
]


@pytest.mark.parametrize(
("release", "expected_download_button"),
[
("3.15.0a1", False),
("3.16.0a1", True),
],
)
def test_windows_manifest_download_button(
fs: FakeFilesystem, release: str, expected_download_button: bool
) -> None:
ftp_root = "/fake_ftp_root"
filename = f"windows-{release}.json"
fs.create_file(Path(ftp_root) / add_to_pydotorg.base_version(release) / filename)

assert list(add_to_pydotorg.list_files(ftp_root, release)) == [
(
filename,
"Windows release manifest",
"windows",
expected_download_button,
f"Install with 'py install {add_to_pydotorg.minor_version(release)}'",
)
]
Loading