Comfy-Org / Comfy-Org/ComfyUI

Pytest for 'test_validation_error_edge1' fails

Open
#7,738 0 comments 0 reactions 0 assignees View on GitHub
Potential Bug
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 6h
Merged PRs (30d)
155

Description

### Expected Behavior

'test_validation_error_edge1' present in tests/inference/test_execution.py class TestExecution should pass as all other tests in the inference folder are passing.

### Actual Behavior

It is the only one failing among the other inference tests with the following final error - `E Failed: DID NOT RAISE `

### Steps to Reproduce

call pytest tests/inference as mentioned in the tests documentation

### Debug Logs

```powershell
got prompt
Failed to validate prompt for output test_validation_error_edge1[_server0-StubInt-5]3:
* TestCustomValidation1 test_validation_error_edge1[_server0-StubInt-5]2:
- Return type mismatch between linked nodes: input1, received_type(INT) mismatch input_type(IMAGE,FLOAT)
Output will be ignored
invalid prompt: {'type': 'prompt_outputs_failed_validation', 'message': 'Prompt outputs failed validation', 'details': '', 'extra_info': {}}
got prompt
Prompt executed in 0.01 seconds
FAILED
tests/inference/test_execution.py:252 (TestExecution.test_validation_error_edge1[_server0-StubFloat-5.0])
self =
test_type = 'StubFloat', test_value = 5.0
client =
builder =

@pytest.mark.parametrize("test_type, test_value", [
("StubInt", 5),
("StubFloat", 5.0)
])
def test_validation_error_edge1(self, test_type, test_value, client: ComfyClient, builder: GraphBuilder):
g = builder
stub = g.node(test_type, value=test_value)
validation1 = g.node("TestCustomValidation1", input1=stub.out(0), input2=3.0)
g.node("SaveImage", images=validation1.out(0))

> with pytest.raises(urllib.error.HTTPError):
E Failed: DID NOT RAISE

tests/inference/test_execution.py:263: Failed
```

### Other

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.