@@ -512,7 +512,7 @@ def test_capability_declares_dolt_owned_versioning() -> None:
512512def test_schema_install_fails_before_engine_or_ddl_when_profile_is_rejected (
513513 monkeypatch ,
514514) -> None :
515- def reject_profile (_database_url ):
515+ def reject_profile (_database_url , ** _kwargs ):
516516 raise openstatspec .UnsupportedOperationError ("Dolt declaration mismatch" )
517517
518518 def unexpected_engine (_database_url ):
@@ -528,3 +528,47 @@ def unexpected_engine(_database_url):
528528 inplace_transform .install_in_place_transformation_schema (
529529 database_url = "mysql+pymysql://user@host/database" ,
530530 )
531+
532+ def test_schema_install_forwards_explicit_dolt_conformance_source (
533+ monkeypatch ,
534+ ) -> None :
535+ sentinel = object ()
536+ captured = []
537+
538+ def capture_profile (_database_url , * , dolt_conformance_source ):
539+ captured .append (dolt_conformance_source )
540+ raise openstatspec .UnsupportedOperationError ("stop after gate" )
541+
542+ monkeypatch .setattr (inplace_transform , "effective_profile" , capture_profile )
543+
544+ with pytest .raises (openstatspec .UnsupportedOperationError , match = "stop after gate" ):
545+ inplace_transform .install_in_place_transformation_schema (
546+ database_url = "mysql+pymysql://user@host/database" ,
547+ dolt_conformance_source = sentinel ,
548+ )
549+
550+ assert captured == [sentinel ]
551+
552+
553+ def test_plan_apply_forwards_explicit_dolt_conformance_source (monkeypatch ) -> None :
554+ sentinel = object ()
555+ captured = []
556+
557+ def capture_submission (** kwargs ):
558+ captured .append (kwargs ["dolt_conformance_source" ])
559+ return {"ok" : True }
560+
561+ monkeypatch .setattr (
562+ inplace_transform , "_run_in_place_submission" , capture_submission ,
563+ )
564+
565+ result = inplace_transform .apply_transformation_plan_in_place (
566+ database_url = "sqlite://" ,
567+ dataset_id = "synthetic" ,
568+ plan = _plan ("RECODE score (1 = 2)." ),
569+ actor = "test-agent" ,
570+ dolt_conformance_source = sentinel ,
571+ )
572+
573+ assert result == {"ok" : True }
574+ assert captured == [sentinel ]
0 commit comments