chore: improve Meshroom maintenance path#3125
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds a new test case for empty graphs in tests/test_graph.py and updates type hints in tests/utils.py to use type[desc.Node] instead of desc.Node. A review comment points out that comparing graph.nodes (a DictModel instance) directly to an empty list [] in the new test will fail, and suggests asserting its length instead.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| def test_empty_graph(): | ||
| """Test edge-case behavior on a graph with no nodes.""" | ||
| graph = Graph("") | ||
| assert graph.nodes == [] |
There was a problem hiding this comment.
Comparing graph.nodes (which is a DictModel instance) directly to a list [] will evaluate to False because DictModel is a custom container class and not a standard Python list. To check if the graph has no nodes, you should check its length or use its truthiness.
| assert graph.nodes == [] | |
| assert len(graph.nodes) == 0 |
Summary:
Notes: