PROBE — which code cells actually execute?
and
PROBE — which code cells actually execute?
1Probe: which code cells actually execute under thebe-lite?¶
Temporary diagnostic page. Not for merge. Run the cells top to bottom, then run the final REPORT cell — it names every cell that actually executed, so a cell that silently did nothing is visible rather than ambiguous.
1.1Setup (top level — control, must work)¶
ran = []
ran.append("A_toplevel_setup")
print("A ok")1.2B — top level, %%file magic (tests the magic independently of nesting)¶
%%file probe_b.txt
hello-from-Bimport os
ran.append("C_toplevel_after_magic")
print("C: probe_b.txt exists?", os.path.exists("probe_b.txt"))
if os.path.exists("probe_b.txt"):
print("C: contents =", open("probe_b.txt").read().strip())1.3D — inside a GATED exercise¶
1.4E — inside a GATED solution¶
Solution to Exercise 1
ran.append("E_in_gated_solution")
print("E ok")1.5F — inside a plain admonition¶
1.6REPORT (top level)¶
expected = ["A_toplevel_setup", "C_toplevel_after_magic",
"D_in_gated_exercise", "E_in_gated_solution", "F_in_note"]
print("EXECUTED:", ran)
print("MISSING :", [e for e in expected if e not in ran])
import os
print("%%file worked at top level:", os.path.exists("probe_b.txt"))