okami.mom/strata
git clone https://git.nkp.pet/okami.mom/strata
b82a36810
main
1"""`strata launch --plan` for a feed model whose entry says `drafter: none` (found by the Q4-P8 rehearsal, G14: the plan said "Drafting: MTP" while setup fetches no draft layer).""" 2 3from __future__import annotations 4 5import unittest 6from unittest import mock 7 8from strata_cli .launch import settings as S 9from tests .terminal .launch_support import HW_12 ,Home ,catalog ,not_intel 10 11 12class PlanLineOfAFeedModel (unittest .TestCase ): 13def setUp (self ): 14not_intel (self ) 15 16def runner (self ,home ,family ): 17from strata_cli .launch .runner import Runner 18cat = catalog (HW_12 ) 19models ,families ,contexts ,source = cat .tables () 20fam = dict (families ["qwen" ],feed = True ,** ({"drafter" :"none" }if family == "none" else {"drafter" :"mtp" })) 21tables = (models , {** families ,"feedmodel" :fam },contexts ,source ) 22p = mock .patch .object (type (cat ),"tables" ,lambda self :tables ) 23p .start () 24self .addCleanup (p .stop ) 25return Runner (S .LaunchSettings (family = "feedmodel" ,model = "Q2_0" ,context = 32768 ,vision = "off" ),catalog = cat ) 26 27def test_drafter_none_is_not_drafting_mtp (self ): 28with Home ()as home : 29line = self .runner (home ,"none" ).drafting_plan_line () 30self .assertEqual (line ,"Drafting: Off" ) 31self .assertNotIn ("MTP" ,line ) 32 33def test_a_feed_model_with_a_drafter_keeps_the_usual_line (self ): 34with Home ()as home : 35self .assertTrue (self .runner (home ,"mtp" ).drafting_plan_line ().startswith ("Drafting:" )) 36self .assertNotEqual (self .runner (home ,"mtp" ).drafting_plan_line (),"Drafting: Off" ) 37 38 39if __name__ == "__main__" : 40unittest .main ()