MCPcopy Create free account
hub / github.com/astral-sh/python-build-standalone / test_upload

Function test_upload

src/github_api_tester.py:331–341  ·  view source on GitHub ↗
(server, upload_release_distributions, tag)

Source from the content-addressed store, hash-verified

329
330@pytest.mark.parametrize("tag", TAGS_TO_TEST)
331async def test_upload(server, upload_release_distributions, tag):
332 with trio.fail_after(300):
333 await upload_release_distributions("--tag", tag)
334 release = get_release(tag=tag)
335 assets = sorted(release.assets, key=lambda a: a.name)
336 assert len(assets) == 2
337 assert assets[0].name == "SHA256SUMS"
338 filename = FILENAME.replace("3.0.0", f"3.0.0+{tag}").replace("-19700101T1234", "")
339 assert assets[1].name == filename
340 assert assets[1].sha256 == SHA256_20MEG
341 assert assets[0].contents == f"{SHA256_20MEG} {filename}\n".encode()
342
343
344async def test_dry_run_writes_shasums_without_contacting_github(tmp_path):

Callers

nothing calls this directly

Calls 2

get_releaseFunction · 0.85

Tested by

no test coverage detected