@@ -263,7 +263,7 @@ def test_grouping_wells_for_column_96_plate(
263
263
decoy .when (mock_well .well_name ).then_return (well_name )
264
264
decoy .when (mock_well .parent ).then_return (mock_96_well_labware )
265
265
266
- wells = group_wells_for_multi_channel_transfer (mock_wells , nozzle_map )
266
+ wells = group_wells_for_multi_channel_transfer (mock_wells , nozzle_map , "source" )
267
267
assert len (wells ) == 2
268
268
assert wells [0 ].well_name == "A1"
269
269
assert wells [1 ].well_name == "A2"
@@ -283,7 +283,7 @@ def test_grouping_wells_for_column_384_plate(
283
283
decoy .when (mock_well .well_name ).then_return (well_name )
284
284
decoy .when (mock_well .parent ).then_return (mock_384_well_labware )
285
285
286
- wells = group_wells_for_multi_channel_transfer (mock_wells , nozzle_map )
286
+ wells = group_wells_for_multi_channel_transfer (mock_wells , nozzle_map , "source" )
287
287
assert len (wells ) == 4
288
288
assert wells [0 ].well_name == "A1"
289
289
assert wells [1 ].well_name == "B1"
@@ -306,13 +306,13 @@ def test_grouping_wells_for_column_96_plate_raises(
306
306
decoy .when (mock_well .parent ).then_return (mock_96_well_labware )
307
307
308
308
# leftover wells
309
- with pytest .raises (ValueError , match = "Could not target all wells" ):
310
- group_wells_for_multi_channel_transfer (mock_wells , nozzle_map )
309
+ with pytest .raises (ValueError , match = "Pipette will access source wells" ):
310
+ group_wells_for_multi_channel_transfer (mock_wells , nozzle_map , "source" )
311
311
312
312
# non-contiguous wells from the same labware
313
- with pytest .raises (ValueError , match = "Could not resolve wells" ):
313
+ with pytest .raises (ValueError , match = "Could not group source wells" ):
314
314
group_wells_for_multi_channel_transfer (
315
- mock_wells [:7 ] + [mock_wells [- 1 ], mock_wells [7 ]], nozzle_map
315
+ mock_wells [:7 ] + [mock_wells [- 1 ], mock_wells [7 ]], nozzle_map , "source"
316
316
)
317
317
318
318
other_labware = decoy .mock (cls = Labware )
@@ -322,9 +322,9 @@ def test_grouping_wells_for_column_96_plate_raises(
322
322
decoy .when (other_well .parent ).then_return (other_labware )
323
323
324
324
# non-contiguous wells from different labware, well name is correct though
325
- with pytest .raises (ValueError , match = "Could not resolve wells" ):
325
+ with pytest .raises (ValueError , match = "Could not group source wells" ):
326
326
group_wells_for_multi_channel_transfer (
327
- mock_wells [:7 ] + [other_well ], nozzle_map
327
+ mock_wells [:7 ] + [other_well ], nozzle_map , "source"
328
328
)
329
329
330
330
@@ -343,16 +343,18 @@ def test_grouping_wells_for_column_384_plate_raises(
343
343
decoy .when (mock_well .parent ).then_return (mock_384_well_labware )
344
344
345
345
# leftover wells
346
- with pytest .raises (ValueError , match = "Could not target all wells" ):
347
- group_wells_for_multi_channel_transfer (mock_wells [:- 1 ], nozzle_map )
346
+ with pytest .raises (ValueError , match = "Pipette will access destination wells" ):
347
+ group_wells_for_multi_channel_transfer (
348
+ mock_wells [:- 1 ], nozzle_map , "destination"
349
+ )
348
350
349
351
# non-contiguous or every other wells from the same labware
350
- with pytest .raises (ValueError , match = "Could not resolve wells " ):
352
+ with pytest .raises (ValueError , match = "Could not group " ):
351
353
group_wells_for_multi_channel_transfer (
352
- mock_wells [:2 ] + [mock_wells [- 1 ]], nozzle_map
354
+ mock_wells [:2 ] + [mock_wells [- 1 ]], nozzle_map , "source"
353
355
)
354
356
group_wells_for_multi_channel_transfer (
355
- mock_wells [:- 1 ] + [mock_wells [0 ]], nozzle_map
357
+ mock_wells [:- 1 ] + [mock_wells [0 ]], nozzle_map , "destination"
356
358
)
357
359
358
360
other_labware = decoy .mock (cls = Labware )
@@ -362,9 +364,9 @@ def test_grouping_wells_for_column_384_plate_raises(
362
364
decoy .when (other_well .parent ).then_return (other_labware )
363
365
364
366
# non-contiguous wells from different labware, well name is correct though
365
- with pytest .raises (ValueError , match = "Could not resolve wells" ):
367
+ with pytest .raises (ValueError , match = "Could not group source wells" ):
366
368
group_wells_for_multi_channel_transfer (
367
- mock_wells [:15 ] + [other_well ], nozzle_map
369
+ mock_wells [:15 ] + [other_well ], nozzle_map , "source"
368
370
)
369
371
370
372
@@ -383,7 +385,9 @@ def test_grouping_wells_for_row_96_plate(
383
385
decoy .when (mock_well .well_name ).then_return (well_name )
384
386
decoy .when (mock_well .parent ).then_return (mock_96_well_labware )
385
387
386
- wells = group_wells_for_multi_channel_transfer (mock_wells , nozzle_map )
388
+ wells = group_wells_for_multi_channel_transfer (
389
+ mock_wells , nozzle_map , "destination"
390
+ )
387
391
assert len (wells ) == 2
388
392
assert wells [0 ].well_name == "A1"
389
393
assert wells [1 ].well_name == "B1"
@@ -404,7 +408,7 @@ def test_grouping_wells_for_row_384_plate(
404
408
decoy .when (mock_well .well_name ).then_return (well_name )
405
409
decoy .when (mock_well .parent ).then_return (mock_384_well_labware )
406
410
407
- wells = group_wells_for_multi_channel_transfer (mock_wells , nozzle_map )
411
+ wells = group_wells_for_multi_channel_transfer (mock_wells , nozzle_map , "source" )
408
412
assert len (wells ) == 4
409
413
assert wells [0 ].well_name == "A1"
410
414
assert wells [1 ].well_name == "A2"
@@ -428,13 +432,13 @@ def test_grouping_wells_for_row_96_plate_raises(
428
432
decoy .when (mock_well .parent ).then_return (mock_96_well_labware )
429
433
430
434
# leftover wells
431
- with pytest .raises (ValueError , match = "Could not target all wells" ):
432
- group_wells_for_multi_channel_transfer (mock_wells [:- 1 ], nozzle_map )
435
+ with pytest .raises (ValueError , match = "Pipette will access source wells" ):
436
+ group_wells_for_multi_channel_transfer (mock_wells [:- 1 ], nozzle_map , "source" )
433
437
434
438
# non-contiguous wells from the same labware
435
- with pytest .raises (ValueError , match = "Could not resolve wells" ):
439
+ with pytest .raises (ValueError , match = "Could not group source wells" ):
436
440
group_wells_for_multi_channel_transfer (
437
- mock_wells [:11 ] + [mock_wells [- 1 ], mock_wells [11 ]], nozzle_map
441
+ mock_wells [:11 ] + [mock_wells [- 1 ], mock_wells [11 ]], nozzle_map , "source"
438
442
)
439
443
440
444
other_labware = decoy .mock (cls = Labware )
@@ -444,9 +448,9 @@ def test_grouping_wells_for_row_96_plate_raises(
444
448
decoy .when (other_well .parent ).then_return (other_labware )
445
449
446
450
# non-contiguous wells from different labware, well name is correct though
447
- with pytest .raises (ValueError , match = "Could not resolve wells" ):
451
+ with pytest .raises (ValueError , match = "Could not group destination wells" ):
448
452
group_wells_for_multi_channel_transfer (
449
- mock_wells [:11 ] + [other_well ], nozzle_map
453
+ mock_wells [:11 ] + [other_well ], nozzle_map , "destination"
450
454
)
451
455
452
456
@@ -466,16 +470,18 @@ def test_grouping_wells_for_row_384_plate_raises(
466
470
decoy .when (mock_well .parent ).then_return (mock_384_well_labware )
467
471
468
472
# leftover wells
469
- with pytest .raises (ValueError , match = "Could not target all wells" ):
470
- group_wells_for_multi_channel_transfer (mock_wells [:- 1 ], nozzle_map )
473
+ with pytest .raises (ValueError , match = "Pipette will access destination wells" ):
474
+ group_wells_for_multi_channel_transfer (
475
+ mock_wells [:- 1 ], nozzle_map , "destination"
476
+ )
471
477
472
478
# non-contiguous or every other wells from the same labware
473
- with pytest .raises (ValueError , match = "Could not resolve wells " ):
479
+ with pytest .raises (ValueError , match = "Could not group " ):
474
480
group_wells_for_multi_channel_transfer (
475
- mock_wells [:2 ] + [mock_wells [- 1 ]], nozzle_map
481
+ mock_wells [:2 ] + [mock_wells [- 1 ]], nozzle_map , "destination"
476
482
)
477
483
group_wells_for_multi_channel_transfer (
478
- mock_wells [:- 1 ] + [mock_wells [0 ]], nozzle_map
484
+ mock_wells [:- 1 ] + [mock_wells [0 ]], nozzle_map , "source"
479
485
)
480
486
481
487
other_labware = decoy .mock (cls = Labware )
@@ -485,9 +491,9 @@ def test_grouping_wells_for_row_384_plate_raises(
485
491
decoy .when (other_well .parent ).then_return (other_labware )
486
492
487
493
# non-contiguous wells from different labware, well name is correct though
488
- with pytest .raises (ValueError , match = "Could not resolve wells" ):
494
+ with pytest .raises (ValueError , match = "Could not group destination wells" ):
489
495
group_wells_for_multi_channel_transfer (
490
- mock_wells [:23 ] + [other_well ], nozzle_map
496
+ mock_wells [:23 ] + [other_well ], nozzle_map , "destination"
491
497
)
492
498
493
499
@@ -500,7 +506,9 @@ def test_grouping_wells_for_full_96_plate(
500
506
decoy .when (mock_well .well_name ).then_return (well_name )
501
507
decoy .when (mock_well .parent ).then_return (mock_96_well_labware )
502
508
503
- wells = group_wells_for_multi_channel_transfer (mock_wells , _96_FULL_MAP )
509
+ wells = group_wells_for_multi_channel_transfer (
510
+ mock_wells , _96_FULL_MAP , "destination"
511
+ )
504
512
assert len (wells ) == 1
505
513
assert wells [0 ].well_name == "A1"
506
514
@@ -515,7 +523,7 @@ def test_grouping_wells_for_full_384_plate(
515
523
decoy .when (mock_well .well_name ).then_return (well_name )
516
524
decoy .when (mock_well .parent ).then_return (mock_384_well_labware )
517
525
518
- wells = group_wells_for_multi_channel_transfer (mock_wells , _96_FULL_MAP )
526
+ wells = group_wells_for_multi_channel_transfer (mock_wells , _96_FULL_MAP , "source" )
519
527
assert len (wells ) == 4
520
528
assert wells [0 ].well_name == "A1"
521
529
assert wells [1 ].well_name == "B1"
@@ -534,8 +542,8 @@ def test_grouping_wells_raises_for_unsupported_configuration() -> None:
534
542
front_right_nozzle = "D1" ,
535
543
valid_nozzle_maps = ValidNozzleMaps (maps = {"Half" : ["A1" , "B1" , "C1" , "D1" ]}),
536
544
)
537
- with pytest .raises (ValueError , match = "Unsupported tip configuration" ):
538
- group_wells_for_multi_channel_transfer ([], nozzle_map )
545
+ with pytest .raises (ValueError , match = "Unsupported nozzle configuration" ):
546
+ group_wells_for_multi_channel_transfer ([], nozzle_map , "source" )
539
547
540
548
541
549
@pytest .mark .parametrize (
@@ -561,5 +569,5 @@ def test_grouping_well_returns_all_wells_for_non_96_or_384_plate(
561
569
decoy .when (mock_well .well_name ).then_return (well_name )
562
570
decoy .when (mock_well .parent ).then_return (mock_reservoir )
563
571
564
- result = group_wells_for_multi_channel_transfer (mock_wells , nozzle_map )
572
+ result = group_wells_for_multi_channel_transfer (mock_wells , nozzle_map , "source" )
565
573
assert result == mock_wells
0 commit comments