tenseleyflow/documentlanguagemodel / b8ca343

Browse files

Strip preference sections from shared doc in watch retrain test

Authored by mfwolffe <wolffemf@dukes.jmu.edu>
SHA
b8ca343ecaf7ef160b29c6f7fdb474b9d3956352
Parents
620e150
Tree
509a918

1 changed file

StatusFile+-
M tests/integration/watch/test_watch_retrain.py 6 2
tests/integration/watch/test_watch_retrain.pymodified
@@ -46,10 +46,14 @@ def test_watch_cycle_detects_new_content_and_retrains( # pragma: no cover - slo
4646
     initial_adapter = store.resolve_current_adapter()
4747
     assert initial_adapter is not None
4848
 
49
-    # Append a new section to the doc so the ChangeSet sees `new`.
49
+    # Strip any ::preference:: sections that earlier session-scoped tests
50
+    # (e.g. test_dpo_tinymodel) may have appended to the shared doc.
5051
     original = doc_path.read_text(encoding="utf-8")
52
+    sft_only = original.split("::preference::")[0].rstrip()
53
+
54
+    # Append a new instruction section so the ChangeSet sees `new`.
5155
     doc_path.write_text(
52
-        original
56
+        sft_only
5357
         + "\n\n::instruction::\n"
5458
         + "### Q\n"
5559
         + "What changed in the watch test?\n"