"""Common routines for the Python zchunk tests."""
+from __future__ import annotations
+
import argparse
import dataclasses
import os
import subprocess
import sys
-from typing import Callable, Dict, List
+from typing import Callable
from pychunk import defs
"""Common runtime configuration settings."""
bindir: pathlib.Path
- env: Dict[str, str]
+ env: dict[str, str]
orig: pathlib.Path
compressed: pathlib.Path
end: int
-def get_runenv() -> Dict[str, str]:
+def get_runenv() -> dict[str, str]:
"""Set up the environment for running the zchunk programs."""
env = dict(os.environ)
env["LC_ALL"] = "C.UTF-8"
env=cfg.env,
).decode("UTF-8")
- params: Dict[str, int] = {}
- chunks: List[Chunk] = []
+ params: dict[str, int] = {}
+ chunks: list[Chunk] = []
def ignore_till_end(line: str) -> str:
"""Ignore anything until EOF."""
return "wait_for_chunk_count"
- handlers: Dict[str, Callable[[str], str]] = {
+ handlers: dict[str, Callable[[str], str]] = {
func.__name__: func
for func in (
wait_for_total_size,