@@ -1776,6 +1776,53 @@ def test_liquid_probe_without_recovery(
1776
1776
subject .liquid_probe_without_recovery (well_core = well_core , loc = loc )
1777
1777
1778
1778
1779
+ def test_liquid_probe_without_recovery_unsafe (
1780
+ decoy : Decoy ,
1781
+ mock_engine_client : EngineClient ,
1782
+ subject : InstrumentCore ,
1783
+ ) -> None :
1784
+ """It should raise an exception on when attempting to liquid probe out of bounds when the pipette is in partial tip."""
1785
+ well_core = WellCore (
1786
+ name = "my cool well" , labware_id = "123abc" , engine_client = mock_engine_client
1787
+ )
1788
+ decoy .when (
1789
+ pipette_movement_conflict .check_safe_for_pipette_movement (
1790
+ engine_state = mock_engine_client .state ,
1791
+ pipette_id = subject .pipette_id ,
1792
+ labware_id = well_core .labware_id ,
1793
+ well_name = well_core .get_name (),
1794
+ well_location = WellLocation (
1795
+ origin = WellOrigin .TOP , offset = WellOffset (x = 0 , y = 0 , z = 2 )
1796
+ ),
1797
+ )
1798
+ ).then_raise (
1799
+ pipette_movement_conflict .PartialTipMovementNotAllowedError (
1800
+ "Requested motion with the A1 nozzle partial configuration is outside of robot bounds for the pipette."
1801
+ )
1802
+ )
1803
+
1804
+ decoy .when (
1805
+ mock_engine_client .execute_command_without_recovery (
1806
+ cmd .LiquidProbeParams (
1807
+ pipetteId = subject .pipette_id ,
1808
+ wellLocation = WellLocation (
1809
+ origin = WellOrigin .TOP , offset = WellOffset (x = 0 , y = 0 , z = 2 )
1810
+ ),
1811
+ wellName = well_core .get_name (),
1812
+ labwareId = well_core .labware_id ,
1813
+ )
1814
+ )
1815
+ ).then_return (
1816
+ cmd .LiquidProbeResult (position = DeckPoint (x = 0 , y = 0 , z = 0 ), z_position = 0 )
1817
+ )
1818
+ loc = Location (Point (0 , 0 , 0 ), None )
1819
+ with pytest .raises (
1820
+ pipette_movement_conflict .PartialTipMovementNotAllowedError ,
1821
+ match = "Requested motion with the A1 nozzle partial configuration is outside of robot bounds for the pipette." ,
1822
+ ):
1823
+ subject .liquid_probe_without_recovery (well_core = well_core , loc = loc )
1824
+
1825
+
1779
1826
def test_liquid_probe_with_recovery (
1780
1827
decoy : Decoy ,
1781
1828
mock_engine_client : EngineClient ,
@@ -1801,6 +1848,53 @@ def test_liquid_probe_with_recovery(
1801
1848
)
1802
1849
1803
1850
1851
+ def test_liquid_probe_with_recovery_unsafe (
1852
+ decoy : Decoy ,
1853
+ mock_engine_client : EngineClient ,
1854
+ subject : InstrumentCore ,
1855
+ ) -> None :
1856
+ """It should raise an exception on when attempting to liquid probe out of bounds when the pipette is in partial tip."""
1857
+ well_core = WellCore (
1858
+ name = "my cool well" , labware_id = "123abc" , engine_client = mock_engine_client
1859
+ )
1860
+ decoy .when (
1861
+ pipette_movement_conflict .check_safe_for_pipette_movement (
1862
+ engine_state = mock_engine_client .state ,
1863
+ pipette_id = subject .pipette_id ,
1864
+ labware_id = well_core .labware_id ,
1865
+ well_name = well_core .get_name (),
1866
+ well_location = WellLocation (
1867
+ origin = WellOrigin .TOP , offset = WellOffset (x = 0 , y = 0 , z = 2 )
1868
+ ),
1869
+ )
1870
+ ).then_raise (
1871
+ pipette_movement_conflict .PartialTipMovementNotAllowedError (
1872
+ "Requested motion with the A1 nozzle partial configuration is outside of robot bounds for the pipette."
1873
+ )
1874
+ )
1875
+
1876
+ decoy .when (
1877
+ mock_engine_client .execute_command (
1878
+ cmd .LiquidProbeParams (
1879
+ pipetteId = subject .pipette_id ,
1880
+ wellLocation = WellLocation (
1881
+ origin = WellOrigin .TOP , offset = WellOffset (x = 0 , y = 0 , z = 2.0 )
1882
+ ),
1883
+ wellName = well_core .get_name (),
1884
+ labwareId = well_core .labware_id ,
1885
+ )
1886
+ )
1887
+ ).then_return (
1888
+ cmd .LiquidProbeResult (position = DeckPoint (x = 0 , y = 0 , z = 0 ), z_position = 0 )
1889
+ )
1890
+ loc = Location (Point (0 , 0 , 0 ), None )
1891
+ with pytest .raises (
1892
+ pipette_movement_conflict .PartialTipMovementNotAllowedError ,
1893
+ match = "Requested motion with the A1 nozzle partial configuration is outside of robot bounds for the pipette." ,
1894
+ ):
1895
+ subject .liquid_probe_with_recovery (well_core = well_core , loc = loc )
1896
+
1897
+
1804
1898
@pytest .mark .parametrize ("version" , versions_at_or_above (APIVersion (2 , 23 )))
1805
1899
def test_load_liquid_class (
1806
1900
decoy : Decoy ,
0 commit comments