def test_get_backend(self): """Test get backends. If all correct should return a name the same as input. """ local_provider = DefaultQISKitProvider() backend = local_provider.get_backend(name='local_qasm_simulator') self.assertEqual(backend.configuration['name'], 'local_qasm_simulator')
def test_get_backend(self): """Test get backends. If all correct should return a name the same as input. """ local_provider = DefaultQISKitProvider() backend = local_provider.get_backend(name='local_qasm_simulator_py') self.assertEqual(backend.configuration['name'], 'local_qasm_simulator_py')
def test_local_backend_status(self): """Test backend_status. If all correct should pass the vaildation. """ local_provider = DefaultQISKitProvider() backend = local_provider.get_backend(name='local_qasm_simulator') status = backend.status schema_path = self._get_resource_path( 'backends/backend_status_schema_py.json', path=Path.SCHEMAS) with open(schema_path, 'r') as schema_file: schema = json.load(schema_file) jsonschema.validate(status, schema)
def test_local_backend_status(self): """Test backend_status. If all correct should pass the vaildation. """ local_provider = DefaultQISKitProvider() backend = local_provider.get_backend(name='local_qasm_simulator') status = backend.status schema_path = self._get_resource_path( 'deprecated/backends/backend_status_schema_py.json', path=Path.SCHEMAS) with open(schema_path, 'r') as schema_file: schema = json.load(schema_file) jsonschema.validate(status, schema)
def test_local_backend_status(self): """Test backend_status. If all correct should pass the vaildation. """ # FIXME: reintroduce in 0.6 self.skipTest('Skipping due to available vs operational') local_provider = DefaultQISKitProvider() backend = local_provider.get_backend(name='local_qasm_simulator') status = backend.status schema_path = self._get_resource_path( 'deprecated/backends/backend_status_schema_py.json', path=Path.SCHEMAS) with open(schema_path, 'r') as schema_file: schema = json.load(schema_file) jsonschema.validate(status, schema)