def test_input_numerical(): x = np.array([[["unknown"]]]) adapter = input_adapter.InputAdapter() with pytest.raises(TypeError) as info: adapter.check(x) x = adapter.transform(x) assert "Expect the data to Input to be numerical" in str(info.value)
def test_input_numerical(): x = np.array([[['unknown']]]) input_node = input_adapter.InputAdapter() with pytest.raises(TypeError) as info: input_node.check(x) x = input_node.transform(x) assert 'Expect the data to Input to be numerical' in str(info.value)
def test_input_type_error(): x = "unknown" adapter = input_adapter.InputAdapter() with pytest.raises(TypeError) as info: adapter.check(x) x = adapter.transform(x) assert "Expect the data to Input to be numpy" in str(info.value)
def test_input_type_error(): x = 'unknown' input_node = input_adapter.InputAdapter() with pytest.raises(TypeError) as info: input_node.check(x) x = input_node.transform(x) assert 'Expect the data to Input to be numpy' in str(info.value)