diff --git a/hidden/__pycache__/test_hidden.cpython-314-pytest-9.1.1.pyc b/hidden/__pycache__/test_hidden.cpython-314-pytest-9.1.1.pyc deleted file mode 100644 index a257e42..0000000 Binary files a/hidden/__pycache__/test_hidden.cpython-314-pytest-9.1.1.pyc and /dev/null differ diff --git a/hidden/test_hidden.py b/hidden/test_hidden.py deleted file mode 100644 index 9b7e0c8..0000000 --- a/hidden/test_hidden.py +++ /dev/null @@ -1,44 +0,0 @@ -"""Hidden interface test for the Record Manager (blank must fail, solved must pass). - -Runs with pytest's cwd = the assembled submission (/work/submission). -Blank (M1 starter) fails because `save`/`load` are unimplemented ("not yet"); -the full reference implements the store round-trip. -""" - -import pathlib -import subprocess - - -def _root() -> pathlib.Path: - return pathlib.Path.cwd() - - -def _run(cmd, timeout=180, **kw): - return subprocess.run(cmd, capture_output=True, text=True, timeout=timeout, **kw) - - -def test_record_manager_interface(): - root = _root() - - build = _run(["make", "-C", str(root), "-j2"]) - assert build.returncode == 0, "BUILD FAILED:\n" + build.stdout + build.stderr - recman = root / "build" / "recman" - assert recman.exists(), "build/recman missing after make" - - # add two records, save to a file - session1 = ( - "add\nAda Lovelace\nada@x\n555-0100\n" - "add\nGrace Hopper\ngrace@x\n444-0200\n" - "save\n/tmp/rm_hidden.txt\nquit\n" - ) - r = _run([str(recman)], input=session1) - assert "added: Ada Lovelace" in r.stdout, "add failed:\n" + r.stdout - assert "added: Grace Hopper" in r.stdout, "add failed:\n" + r.stdout - assert "saved" in r.stdout, "save did not persist (blank starter prints 'not yet'):\n" + r.stdout - - # load back in a fresh session and confirm the round-trip - session2 = "load\n/tmp/rm_hidden.txt\nlist\nquit\n" - r2 = _run([str(recman)], input=session2) - assert "Ada Lovelace" in r2.stdout and "Grace Hopper" in r2.stdout, ( - "save/load round-trip failed:\n" + r2.stdout - )