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
4 changes: 4 additions & 0 deletions python/tests/packaging/test_installed_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def test_wheel_imports_outside_the_repository(
with zipfile.ZipFile(wheel) as archive:
wheel_files = set(archive.namelist())
assert "mooncake/store/__init__.py" in wheel_files
assert "mooncake/_structured_ranges.py" in wheel_files
assert {"mooncake/py.typed", "mooncake/engine.pyi"} <= wheel_files
assert not any(name.endswith("mooncake_store_rs.pth") for name in wheel_files)
assert not any(name.startswith("mooncake_store_rs/") for name in wheel_files)
Expand Down Expand Up @@ -198,8 +199,11 @@ def test_wheel_imports_outside_the_repository(
assert util.find_spec("numpy") is None
assert util.find_spec("PIL") is None
assert util.find_spec("mooncake.structured_object_store") is not None
assert util.find_spec("mooncake._structured_ranges") is not None
assert "mooncake.structured_object_store" not in sys.modules
assert "mooncake._structured_ranges" not in sys.modules
assert "mooncake/structured_object_store.py" in installed_files
assert "mooncake/_structured_ranges.py" in installed_files
assert any(
path.startswith("mooncake/_fast_copy.") and path.endswith(".so")
for path in installed_files
Expand Down
12 changes: 10 additions & 2 deletions python/tests/packaging/test_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@ def test_structured_object_storage_has_one_authoritative_source() -> None:
legacy_package_root = REPOSITORY_ROOT / "mooncake-wheel" / "mooncake"
legacy_test_root = REPOSITORY_ROOT / "mooncake-wheel" / "tests"

for module in ("structured_object_store.py", "_fast_copy.c"):
for module in (
"structured_object_store.py",
"_structured_ranges.py",
"_fast_copy.c",
):
assert (package_root / module).is_file()
assert not (legacy_package_root / module).exists()

Expand All @@ -115,7 +119,11 @@ def test_structured_object_storage_has_one_authoritative_source() -> None:
.split(")", 1)[0]
.split()
)
assert {"structured_object_store.py", "_fast_copy.c"} <= set(migrated_modules)
assert {
"structured_object_store.py",
"_structured_ranges.py",
"_fast_copy.c",
} <= set(migrated_modules)


def test_http_metadata_service_has_one_authoritative_source(
Expand Down
1 change: 1 addition & 0 deletions scripts/build_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ MIGRATED_PYTHON_MODULES=(
py.typed
engine.pyi
structured_object_store.py
_structured_ranges.py
_fast_copy.c
http_metadata_server.py
_launcher.py
Expand Down
Loading