def test_clear_tip_length_calibration_data(monkeypatch): calpath = config.get_tip_length_cal_path() with open(calpath / f'{PIPETTE_ID}.json', 'w') as offset_file: test_offset = {MOCK_HASH: {'tipLength': 22.0, 'lastModified': 1}} json.dump(test_offset, offset_file) assert len(os.listdir(calpath)) > 0 delete.clear_tip_length_calibration() assert len(os.listdir(calpath)) == 0
def reset_tip_probe(): config = rc.load() config = config._replace( instrument_offset=rc.build_fallback_instrument_offset({})) if ff.enable_calibration_overhaul(): delete.clear_tip_length_calibration() else: config.tip_length.clear() rc.save_robot_settings(config)
def test_load_tip_length_calibration_v1(robot): lw = containers_load(robot, 'opentrons_96_tiprack_10ul', '1') hash = lw.properties['labware_hash'] tip_length_data = {'tipLength': 19.99, 'lastModified': utc_now()} tip_length_cal = {hash: tip_length_data} pip_id = 'fake_id' modify.save_tip_length_calibration(pip_id=pip_id, tip_length_cal=tip_length_cal) result = load_tip_length_calibration(pip_id, lw.wells('A1')) assert result == tip_length_data delete.clear_tip_length_calibration() # clean up