| 1 | #!/usr/bin/env bash |
| 2 | set -e |
| 3 | export PYTHONPYCACHEPREFIX="$(mktemp -d)" |
| 4 | python3 - <<'PY' |
| 5 | import core, cache, cli |
| 6 | assert not hasattr(core, "fetch_all") |
| 7 | assert core.list_records() == {"a": 1, "b": 2} |
| 8 | assert cache.list_records_cached() == {"a": 1, "b": 2} |
| 9 | import io, contextlib |
| 10 | buf = io.StringIO() |
| 11 | with contextlib.redirect_stdout(buf): |
| 12 | cli.main() |
| 13 | assert buf.getvalue() == "a=1\nb=2\n" |
| 14 | PY |
| 15 |