@@ -48,42 +48,27 @@ def test_repr(self, builder: ScenarioBuilder) -> None:
4848 """Test builder __repr__."""
4949 assert repr (builder ) == "<ScenarioBuilder name='test-scenario'>"
5050
51- def test_from_blueprint_returns_self (self , builder : ScenarioBuilder , mock_blueprint : Blueprint ) -> None :
52- """Test from_blueprint returns self for chaining."""
51+ def test_from_blueprint_and_snapshot (
52+ self , builder : ScenarioBuilder , mock_blueprint : Blueprint , mock_snapshot : Snapshot
53+ ) -> None :
54+ """Test blueprint/snapshot setting returns self and are mutually exclusive."""
55+ # from_blueprint returns self and sets blueprint
5356 result = builder .from_blueprint (mock_blueprint )
54-
5557 assert result is builder
5658 assert builder ._blueprint is mock_blueprint
5759 assert builder ._snapshot is None
5860
59- def test_from_snapshot_returns_self (self , builder : ScenarioBuilder , mock_snapshot : Snapshot ) -> None :
60- """Test from_snapshot returns self for chaining."""
61+ # from_snapshot returns self, sets snapshot, and clears blueprint
6162 result = builder .from_snapshot (mock_snapshot )
62-
6363 assert result is builder
6464 assert builder ._snapshot is mock_snapshot
6565 assert builder ._blueprint is None
6666
67- def test_from_blueprint_clears_snapshot (
68- self , builder : ScenarioBuilder , mock_blueprint : Blueprint , mock_snapshot : Snapshot
69- ) -> None :
70- """Test that setting blueprint clears snapshot."""
71- builder .from_snapshot (mock_snapshot )
67+ # from_blueprint clears snapshot
7268 builder .from_blueprint (mock_blueprint )
73-
7469 assert builder ._blueprint is mock_blueprint
7570 assert builder ._snapshot is None
7671
77- def test_from_snapshot_clears_blueprint (
78- self , builder : ScenarioBuilder , mock_blueprint : Blueprint , mock_snapshot : Snapshot
79- ) -> None :
80- """Test that setting snapshot clears blueprint."""
81- builder .from_blueprint (mock_blueprint )
82- builder .from_snapshot (mock_snapshot )
83-
84- assert builder ._snapshot is mock_snapshot
85- assert builder ._blueprint is None
86-
8772 def test_with_working_directory_returns_self (self , builder : ScenarioBuilder ) -> None :
8873 """Test with_working_directory returns self for chaining."""
8974 result = builder .with_working_directory ("/app" )
0 commit comments