Example #1
0
    def test_design_delete_all_pins(self):
        """Test delete_all_pins functionality in design_base.py."""
        design = DesignPlanar()
        design.overwrite_enabled = True

        TransmonPocket(design, 'Q1')
        TransmonPocket(design, 'Q2')

        design.connect_pins(1, 'p1', 2, 'p2')
        pf = design._qnet._net_info
        self.assertFalse(pf.empty)

        design.delete_all_pins()
        pf = design._qnet._net_info
        self.assertTrue(pf.empty)
Example #2
0
    def test_design_connect_pins(self):
        """Test connect_pins functionality in design_base.py."""
        design = DesignPlanar()
        design.overwrite_enabled = True

        TransmonPocket(design, 'Q1')
        TransmonPocket(design, 'Q2')

        design.connect_pins(1, 'p1', 2, 'p2')
        pf = design._qnet._net_info

        self.assertFalse(pf.empty)
        self.assertEqual(pf['net_id'][0], 1)
        self.assertEqual(pf['net_id'][1], 1)
        self.assertEqual(pf['component_id'][0], 1)
        self.assertEqual(pf['component_id'][1], 2)
        self.assertEqual(pf['pin_name'][0], 'p1')
        self.assertEqual(pf['pin_name'][1], 'p2')