def test_normal(self): self.config.validate(update_dict(self.launcher, device='CPU'))
def test_hetero_empty(self): with pytest.raises(ConfigError): self.config.validate(update_dict(self.launcher, device='HETERO:'))
def test_normal_multiple_devices(self): with pytest.raises(ConfigError): self.config.validate(update_dict(self.launcher, device='CPU,CPU'))
def test_hetero_endswith_comma(self): with pytest.raises(ConfigError): self.config.validate( update_dict(self.launcher, device='HETERO:CPU,CPU,'))
def test_hetero_correct(self): self.config.validate(update_dict(self.launcher, device='HETERO:CPU')) self.config.validate( update_dict(self.launcher, device='HETERO:CPU,CPU'))
def test_hetero__correct(self): self.config.validate(update_dict(self.launcher, device="HETERO:CPU")) self.config.validate( update_dict(self.launcher, device="HETERO:CPU,FPGA"))