def setUp(self): source_root = os.path.dirname(os.path.realpath(__file__)) self.source_root = Path(source_root) root_path = get_root_path() / "test_projectcsv" self.serial_no = self.serial_no = "123" by_serial_no = False self.path = SavePath(root_path, self.serial_no, by_serial_no)
def setUp(self): self.serial_no = "123" self.settings = default_settings.copy() path = get_root_path() / "test_measure" self.settings['save']['directory'] = path vna = Vna() vna.open_tcp() vna.clear_status() self.vna = vna
def __init__(self, settings=None): super(Settings, self).__init__(lambda: None) if settings: self.update(to_none_default(settings)) self['dut'] = self['dut'] or 'DUT' self['display'] = self['display'] or 'default' self['instrument'] = self['instrument'] or none_default_dict.copy() instr = self['instrument'] instr['connection type'] = instr['connection type'] or 'tcpip' instr['address'] = instr['address'] or '127.0.0.1' self['save'] = self['save'] or none_default_dict.copy() save = self['save'] save['directory'] = save['directory'] or str(get_root_path())
def setUp(self): root_path = get_root_path() / "test_diagram" serial_no = "123" by_serial_no = True self.path = SavePath(root_path, serial_no, by_serial_no) vna = Vna() vna.open_tcp() vna.clear_status() vna.manual_sweep = True timeout_ms = 2 * vna.sweep_time_ms + 5000 vna.start_sweeps() vna.pause(timeout_ms) self.vna = vna self.settings = default_settings.copy()
def setUp(self): source_root = os.path.dirname(os.path.realpath(__file__)) self.source_root = Path(source_root) root_path = get_root_path() / "test_html" serial_no = self.serial_no = "123" by_serial_no = True self.path = SavePath(root_path, serial_no, by_serial_no) vna = Vna() vna.open_tcp() vna.clear_status() vna.manual_sweep = True timeout_ms = 2 * vna.sweep_time_ms + 5000 vna.start_sweeps() vna.pause(timeout_ms) self.vna = vna self.settings = default_settings.copy()
def test_defaults(self): s = Settings() self.assertEqual(s['dut'], 'DUT') self.assertEqual(s['display'], 'default') self.assertEqual(s['instrument']['connection type'], 'tcpip') self.assertEqual(s['instrument']['address'], '127.0.0.1') self.assertEqual(s['save']['directory'], str(get_root_path())) self.assertFalse(s['save']['disable global limit']) self.assertFalse(s['save']['disable touchstone files']) self.assertFalse(s['save']['disable trace csv files']) self.assertFalse(s['save']['disable screenshots']) self.assertFalse(s['save']['disable per-test limits']) self.assertFalse(s['save']['disable markers']) self.assertFalse(s['save']['disable html summary']) self.assertFalse(s['save']['disable results json']) self.assertFalse(s['save']['organize by file']) self.assertFalse(s['save']['enable project csv']) self.assertTrue(s.is_save_vna()) self.assertTrue(s.is_save_channels()) self.assertTrue(s.is_save_diagrams()) self.assertTrue(s.is_save_traces())