def test_design_rename_variable(self): """Test rename_variable in QDesign class""" design = QDesign(metadata={}) design.rename_variable('cpw_gap', 'new_name') my_keys = design._variables.keys() self.assertEqual(len(my_keys), 2) self.assertTrue('cpw_width' in my_keys) self.assertTrue('new_name' in my_keys)
def test_design_instantiate_design_components(self): """Test the instantiation of Components.""" design = QDesign() try: Components(design) except Exception: self.fail("Components(design) failed")
def test_design_instantiate_qdesign(self): """Test the instantiation of QDesign.""" try: QDesign() except Exception: self.fail("QDesign failed") try: QDesign(metadata={}) except Exception: self.fail("QDesign(metadata={}) failed") try: QDesign(metadata={}, overwrite_enabled=True) except Exception: self.fail("QDesign(metadata={}, overwrite_enabled=True) failed")
def test_design_get_chip_layer(self): """Test getting chip size in design_base.py.""" design = QDesign(metadata={}) self.assertEqual(design.get_chip_layer('main'), 0)