@@ -2350,16 +2350,6 @@ def test_consolidate_liquid_raises_if_tip_has_liquid(
2350
2350
decoy .when (mock_validation .ensure_new_tip_policy ("never" )).then_return (
2351
2351
TransferTipPolicyV2 .ONCE
2352
2352
)
2353
- decoy .when (mock_instrument_core .get_nozzle_map ()).then_return (MOCK_MAP )
2354
- decoy .when (mock_instrument_core .get_active_channels ()).then_return (2 )
2355
- decoy .when (
2356
- labware .next_available_tip (
2357
- starting_tip = None ,
2358
- tip_racks = tip_racks ,
2359
- channels = 2 ,
2360
- nozzle_map = MOCK_MAP ,
2361
- )
2362
- ).then_return ((decoy .mock (cls = Labware ), decoy .mock (cls = Well )))
2363
2353
decoy .when (mock_instrument_core .get_current_volume ()).then_return (1000 )
2364
2354
with pytest .raises (RuntimeError , match = "liquid already in the tip" ):
2365
2355
subject .consolidate_liquid (
@@ -2371,6 +2361,37 @@ def test_consolidate_liquid_raises_if_tip_has_liquid(
2371
2361
)
2372
2362
2373
2363
2364
+ @pytest .mark .parametrize ("robot_type" , ["OT-2 Standard" , "OT-3 Standard" ])
2365
+ def test_consolidate_liquid_raises_if_tip_policy_per_source (
2366
+ decoy : Decoy ,
2367
+ mock_protocol_core : ProtocolCore ,
2368
+ mock_instrument_core : InstrumentCore ,
2369
+ subject : InstrumentContext ,
2370
+ robot_type : RobotType ,
2371
+ minimal_liquid_class_def2 : LiquidClassSchemaV1 ,
2372
+ ) -> None :
2373
+ """It should raise errors if the tip policy is "per source"."""
2374
+ test_liq_class = LiquidClass .create (minimal_liquid_class_def2 )
2375
+ mock_well = decoy .mock (cls = Well )
2376
+
2377
+ decoy .when (
2378
+ mock_validation .ensure_valid_flat_wells_list_for_transfer_v2 ([mock_well ])
2379
+ ).then_return ([mock_well ])
2380
+ decoy .when (mock_validation .ensure_new_tip_policy ("per source" )).then_return (
2381
+ TransferTipPolicyV2 .PER_SOURCE
2382
+ )
2383
+ with pytest .raises (
2384
+ RuntimeError , match = '"per source" incompatible with consolidate.'
2385
+ ):
2386
+ subject .consolidate_liquid (
2387
+ liquid_class = test_liq_class ,
2388
+ volume = 10 ,
2389
+ source = [mock_well ],
2390
+ dest = mock_well ,
2391
+ new_tip = "per source" ,
2392
+ )
2393
+
2394
+
2374
2395
@pytest .mark .parametrize ("robot_type" , ["OT-2 Standard" , "OT-3 Standard" ])
2375
2396
def test_consolidate_liquid_delegates_to_engine_core (
2376
2397
decoy : Decoy ,
0 commit comments