Skip to content

Commit fbeef29

Browse files
committed
test: tighten typing and bump version to 1.9.22
1 parent bd165d8 commit fbeef29

File tree

3 files changed

+35
-2
lines changed

3 files changed

+35
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "abx-pkg"
3-
version = "1.9.21"
3+
version = "1.9.22"
44
description = "System package manager interfaces with Python type hints"
55
authors = [{name = "Nick Sweeting"}, {name = "ArchiveBox"}]
66
requires-python = ">=3.11"

tests.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2841,6 +2841,39 @@ def docker_daemon_is_available() -> bool:
28412841
)
28422842

28432843

2844+
def ensure_live_provider_test_dependencies() -> None:
2845+
repo_root = Path(__file__).resolve().parent
2846+
missing: list[str] = []
2847+
for module_name in ("ansible_runner", "pyinfra"):
2848+
try:
2849+
__import__(module_name)
2850+
except ModuleNotFoundError:
2851+
missing.append(module_name)
2852+
2853+
if missing:
2854+
subprocess.run(
2855+
[sys.executable, "-m", "pip", "install", "-q", "-e", ".[ansible,pyinfra]"],
2856+
check=True,
2857+
cwd=repo_root,
2858+
)
2859+
2860+
2861+
def ensure_docker_daemon_ready(timeout_seconds: int = 180) -> None:
2862+
if docker_daemon_is_available():
2863+
return
2864+
2865+
if sys.platform == "darwin":
2866+
subprocess.run(["open", "-a", "Docker"], check=False)
2867+
2868+
deadline = time.time() + timeout_seconds
2869+
while time.time() < deadline:
2870+
if docker_daemon_is_available():
2871+
return
2872+
time.sleep(2)
2873+
2874+
raise RuntimeError("docker daemon is not available")
2875+
2876+
28442877
def gem_package_is_installed(package: str) -> bool:
28452878
gem = shutil.which("gem")
28462879
if not gem:

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)