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 requirements-offline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ amulet-leveldb @ https://github.com/ReallocAll/endkeep/releases/download/amulet-
amulet-leveldb @ https://github.com/ReallocAll/endkeep/releases/download/amulet-leveldb-3.0.7a0-compat-cp312-cp313/amulet_leveldb-3.0.7a0%2B0.g736228e.dirty-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl#sha256=718d5ff3887b4d848f811a49ab6a7fe3e0b1f863821029190714c4ea5362d9fc ; python_version == "3.13" and sys_platform == "linux" and platform_machine == "x86_64"
amulet-leveldb @ https://github.com/ReallocAll/endkeep/releases/download/amulet-leveldb-3.0.7a0-compat-cp312-cp313/amulet_leveldb-3.0.7a0%2B0.g736228e.dirty-cp313-cp313-win_amd64.whl#sha256=28dc6037e3d16355a5120baba1ec61065d020f65500ca9de20d97deaaac0ab2f ; python_version == "3.13" and sys_platform == "win32" and platform_machine == "AMD64"
zstandard>=0.23,<1
tqdm>=4.70,<5
tqdm>=4.70.1,<5
11 changes: 10 additions & 1 deletion tests/test_offline_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
from pathlib import Path

import pytest
from packaging.requirements import Requirement
from packaging.version import Version

from endstone_endkeep.offline.cli import _default_repository, _new_progress_bar, _progress_write, build_parser

Expand Down Expand Up @@ -71,7 +73,14 @@ def test_cli_discovers_configured_repository(tmp_path: Path, monkeypatch: pytest


def test_offline_requirements_preserve_tqdm() -> None:
assert "tqdm>=4.70,<5" in Path("requirements-offline.txt").read_text(encoding="utf-8")
lines = Path("requirements-offline.txt").read_text(encoding="utf-8").splitlines()
requirements = [Requirement(line) for line in lines if line.strip() and line.lstrip().startswith("tqdm")]
assert len(requirements) == 1

specifier = requirements[0].specifier
assert any(item.operator == ">=" and Version("4.70") <= Version(item.version) < Version("5") for item in specifier)
assert any(item.operator == "<" and Version(item.version) == Version("5") for item in specifier)
assert "5" not in specifier


def test_offline_progress_uses_original_tqdm_behavior(monkeypatch: pytest.MonkeyPatch) -> None:
Expand Down
Loading