def test_load_test_instrument(): config_data = StringIO(u""" test: class: !!python/name:instruments.Instrument uri: test:// """) insts = load_instruments(config_data) assert isinstance(insts['test'], Instrument)
def test_load_test_instrument_subtree(): config_data = StringIO(u""" instruments: test: class: !!python/name:instruments.Instrument uri: test:// """) insts = load_instruments(config_data, conf_path="/instruments") assert isinstance(insts['test'], Instrument)
def test_load_test_instrument_setattr(): config_data = StringIO(u""" test: class: !!python/name:instruments.Instrument uri: test:// attrs: foo: !Q 111 GHz """) insts = load_instruments(config_data) assert insts['test'].foo == u.Quantity(111, 'GHz')
def test_load_test_instrument_setattr(): config_data = StringIO(u""" test: class: !!python/name:instruments.Instrument uri: test:// attrs: foo: !Q 111 GHz """) insts = load_instruments(config_data) assert insts['test'].foo == pq.Quantity(111, 'GHz')