|
12 | 12 | SherlockEnableLeadModelingError, |
13 | 13 | SherlockExportNetListError, |
14 | 14 | SherlockExportPartsListError, |
15 | | - SherlockGetPartLocationError, |
16 | 15 | SherlockImportPartsListError, |
17 | 16 | SherlockNoGrpcConnectionException, |
18 | 17 | SherlockUpdatePartsFromAVLError, |
@@ -52,7 +51,6 @@ def test_all(): |
52 | 51 | helper_test_export_parts_list(parts) |
53 | 52 | helper_test_export_net_list(parts) |
54 | 53 | helper_test_enable_lead_modeling(parts) |
55 | | - helper_test_get_part_location(parts) |
56 | 54 | helper_test_get_parts_list_properties(parts) |
57 | 55 | helper_test_update_pad_properties(parts) |
58 | 56 | helper_test_import_parts_to_avl(parts) |
@@ -602,96 +600,6 @@ def helper_test_enable_lead_modeling(parts: Parts): |
602 | 600 | assert str(e) == "Enable lead modeling error: CCA name is invalid." |
603 | 601 |
|
604 | 602 |
|
605 | | -def helper_test_get_part_location(parts: Parts): |
606 | | - """Test get_part_location API""" |
607 | | - |
608 | | - if parts._is_connection_up(): |
609 | | - try: |
610 | | - parts.get_part_location( |
611 | | - "Tutorial Project", |
612 | | - "Invalid CCA", |
613 | | - "C1", |
614 | | - "in", |
615 | | - ) |
616 | | - pytest.fail("No exception raised when using an invalid parameter") |
617 | | - except Exception as e: |
618 | | - assert type(e) == SherlockGetPartLocationError |
619 | | - |
620 | | - try: |
621 | | - locations = parts.get_part_location( |
622 | | - "Tutorial Project", |
623 | | - "Main Board", |
624 | | - "C1, C3", |
625 | | - "in", |
626 | | - ) |
627 | | - |
628 | | - assert len(locations) == 2, "Incorrect number of locations" |
629 | | - location_c1 = locations[0] |
630 | | - assert location_c1.ref_des == "C1", "Incorrect refDes" |
631 | | - assert location_c1.x == -2.7, "Incorrect X coordinate for C1" |
632 | | - assert location_c1.y == -1.65, "Incorrect Y coordinate for C1" |
633 | | - assert location_c1.rotation == 0, "Incorrect rotation for C1" |
634 | | - assert location_c1.location_units == "in", "Incorrect location units for C1" |
635 | | - assert location_c1.board_side == "TOP", "Incorrect board side for C1" |
636 | | - assert location_c1.mirrored is False, "Incorrect mirrored for C1" |
637 | | - |
638 | | - location_c3 = locations[1] |
639 | | - assert location_c3.ref_des == "C3", "Incorrect refDes" |
640 | | - assert location_c3.x == -2.4, "Incorrect X coordinate for C3" |
641 | | - assert location_c3.y == -1.9, "Incorrect Y coordinate for C3" |
642 | | - assert location_c3.rotation == 180, "Incorrect rotation for C3" |
643 | | - assert location_c3.location_units == "in", "Incorrect location units for C3" |
644 | | - assert location_c3.board_side == "TOP", "Incorrect board side for C3" |
645 | | - assert location_c3.mirrored is False, "Incorrect mirrored for C3" |
646 | | - |
647 | | - except SherlockGetPartLocationError as e: |
648 | | - pytest.fail(e.message) |
649 | | - |
650 | | - try: |
651 | | - parts.get_part_location( |
652 | | - "", |
653 | | - "Card", |
654 | | - "C1", |
655 | | - "in", |
656 | | - ) |
657 | | - pytest.fail("No exception raised when using an invalid parameter") |
658 | | - except SherlockGetPartLocationError as e: |
659 | | - assert str(e) == "Get part location error: Project name is invalid." |
660 | | - |
661 | | - try: |
662 | | - parts.get_part_location( |
663 | | - "Test", |
664 | | - "", |
665 | | - "C1", |
666 | | - "in", |
667 | | - ) |
668 | | - pytest.fail("No exception raised when using an invalid parameter") |
669 | | - except SherlockGetPartLocationError as e: |
670 | | - assert str(e) == "Get part location error: CCA name is invalid." |
671 | | - |
672 | | - try: |
673 | | - parts.get_part_location( |
674 | | - "Test", |
675 | | - "Card", |
676 | | - "", |
677 | | - "in", |
678 | | - ) |
679 | | - pytest.fail("No exception raised when using an invalid parameter") |
680 | | - except SherlockGetPartLocationError as e: |
681 | | - assert str(e) == "Get part location error: Ref Des is invalid." |
682 | | - |
683 | | - try: |
684 | | - parts.get_part_location( |
685 | | - "Test", |
686 | | - "Card", |
687 | | - "C1", |
688 | | - "", |
689 | | - ) |
690 | | - pytest.fail("No exception raised when using an invalid parameter") |
691 | | - except SherlockGetPartLocationError as e: |
692 | | - assert str(e) == "Get part location error: Location unit is invalid." |
693 | | - |
694 | | - |
695 | 603 | def helper_test_get_parts_list_properties(parts: Parts): |
696 | 604 | """Test get_parts_list_properties API""" |
697 | 605 | try: |
|
0 commit comments