Harshakamalur opened a new pull request, #728:
URL: https://github.com/apache/wayang/pull/728
## Summary
Fixes #630
This PR fixes the previously skipped `test_dl_tensorflow` test by addressing
both issues mentioned in the issue: missing test resources and type errors with
nested lists.
## Changes
- **`python/src/pywy/tests/test_dl.py`**
- Removed `@pytest.mark.skip` decorator
- Replaced hardcoded `/var/www/html/` paths with `importlib.resources`
pointing to proper bundled test resources
- Fixed incorrect type annotation: `floats: List[List[int]]` →
`List[List[float]]`
- **`python/src/pywy/types.py`**
- Fixed `typecheck()` to use `get_origin()` instead of `isinstance()` for
correct handling of nested generic types like `List[List[float]]`
- `isinstance(input_type, List)` does not work for typing generics;
`get_origin(input_type) is list` is the correct approach
## Test Result
The test now runs and successfully constructs the full computation plan. The
`ConnectionError` at the end is expected behavior, executing the plan requires
a running Wayang backend server, which is outside the scope of this fix.
## Future Improvements
- The `ConnectionError` at execution time could be addressed in a follow-up
by mocking the backend connection or adding a `@pytest.mark.integration` marker
to separate unit and integration tests.
## Related
Closes #630
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]