def test_validate_neuropod_config_invalid_name(self): config = get_valid_config() config["name"] = True with self.assertRaises(ValueError): validate_neuropod_config(config)
def test_validate_neuropod_config_invalid_platform(self): config = get_valid_config() config["platform"] = 5 with self.assertRaises(ValueError): validate_neuropod_config(config)
def test_validate_neuropod_config(self): validate_neuropod_config(get_valid_config())
def test_validate_neuropod_config_invalid_spec_shape_element(self): config = get_valid_config() config["input_spec"][0]["shape"] = (None, 2, "some_symbol", True) with self.assertRaises(ValueError): validate_neuropod_config(config)
def test_validate_neuropod_config_invalid_spec_shape(self): config = get_valid_config() config["input_spec"][0]["shape"] = "123" with self.assertRaises(ValueError): validate_neuropod_config(config)
def test_validate_neuropod_config_invalid_spec_dtype(self): config = get_valid_config() config["input_spec"][0]["dtype"] = "complex128" with self.assertRaises(ValueError): validate_neuropod_config(config)
def test_validate_neuropod_config_input_without_device(self): config = get_valid_config() config["input_tensor_device"] = {} with self.assertRaises(ValueError): validate_neuropod_config(config)