Test cases for check_bipartite_graph_bfs#10688
Test cases for check_bipartite_graph_bfs#10688cclauss merged 10 commits intoTheAlgorithms:masterfrom
Conversation
| >>> check_bipartite( | ||
| ... {0: [1, 3], 1: [0, 2], 2: [1, 3], 3: [0, 2], 4: [0]} | ||
| ... ) | ||
| False |
There was a problem hiding this comment.
Please add some negative values, floating point values, and some strings.
Also,
{}
{7: [1, 3], 1: [0, 2], 2: [1, 3], 3: [0, 2], 4: [0]}
{0: [1, 3], 1: [0, 2], 2: [1, 3], 3: [0, 2], 9: [0]}
There was a problem hiding this comment.
thanks for the additional test cases! I'll have to refactor the code a bit as it assumes that there's keys for all values from 0 to n. Will add different data types as well.
There was a problem hiding this comment.
It is OK to fail if the input is not 1 to n or if other garbage data is provided. We just want to ensure the code does safe things in the face of garbage data. Raising a ValueError is safe.
There was a problem hiding this comment.
Understood. Thanks for the clarification!
for more information, see https://pre-commit.ci
… check_bipartite_graph_bfs_tests
…RaymondDashWu/Python into check_bipartite_graph_bfs_tests
|
The only failing error deals with an issue mentioned in #10717. I'll be moving on to another PR until that's fixed. |
Describe your change:
Contributes to #9943 . For maintainers: The automated tester is saying L65 needs tests but I'm not sure what it's asking for.
Checklist: