chore: initialize containerized Python learning workbook (2026 DevOps/SRE)

This commit is contained in:
soda64 committed 2026-11-30 22:55:56 +01:00
commit ae4c421815
63 files changed
+1273

No files matched your search

@@ -0,0 +1,24 @@
from pathlib import Path
from strings_files import count_non_empty_lines, parse_key_value_lines
def test_parse_key_value_lines() -> None:
raw = """
# konfiguracja
HOST=127.0.0.1
PORT = 8080
DEBUG=true
"""
assert parse_key_value_lines(raw) == {
"HOST": "127.0.0.1",
"PORT": "8080",
"DEBUG": "true",
}
def test_count_non_empty_lines(tmp_path: Path) -> None:
sample = tmp_path / "sample.txt"
sample.write_text("line1\n\n \nline2\nline3\n", encoding="utf-8")
assert count_non_empty_lines(sample) == 3