Skip to content

Commit 7ae974f

Browse files
authored
Fix: Remove invalid FIXME test cases with float values from bipartite check functions
Removed tests that were expected to fail due to type errors with non-integer keys.
1 parent a051ab5 commit 7ae974f

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

graphs/check_bipatrite.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,6 @@ def is_bipartite_dfs(graph: dict[int, list[int]]) -> bool:
4040
False
4141
>>> is_bipartite_dfs({-1: [0, 2], 0: [-1, 1], 1: [0, 2], 2: [-1, 1]})
4242
True
43-
>>> is_bipartite_dfs({0.9: [1, 3], 1: [0, 2], 2: [1, 3], 3: [0, 2]})
44-
True
45-
46-
>>> # FIXME: This test should fails with
47-
>>> # TypeError: list indices must be integers or...
48-
>>> is_bipartite_dfs({0: [1.0, 3.0], 1.0: [0, 2.0], 2.0: [1.0, 3.0], 3.0: [0, 2.0]})
49-
True
5043
>>> is_bipartite_dfs({"a": [1, 3], "b": [0, 2], "c": [1, 3], "d": [0, 2]})
5144
True
5245
>>> is_bipartite_dfs({0: ["b", "d"], 1: ["a", "c"], 2: ["b", "d"], 3: ["a", "c"]})
@@ -120,13 +113,6 @@ def is_bipartite_bfs(graph: dict[int, list[int]]) -> bool:
120113
False
121114
>>> is_bipartite_bfs({-1: [0, 2], 0: [-1, 1], 1: [0, 2], 2: [-1, 1]})
122115
True
123-
>>> is_bipartite_bfs({0.9: [1, 3], 1: [0, 2], 2: [1, 3], 3: [0, 2]})
124-
True
125-
126-
>>> # FIXME: This test should fails with
127-
>>> # TypeError: list indices must be integers or...
128-
>>> is_bipartite_bfs({0: [1.0, 3.0], 1.0: [0, 2.0], 2.0: [1.0, 3.0], 3.0: [0, 2.0]})
129-
True
130116
>>> is_bipartite_bfs({"a": [1, 3], "b": [0, 2], "c": [1, 3], "d": [0, 2]})
131117
True
132118
>>> is_bipartite_bfs({0: ["b", "d"], 1: ["a", "c"], 2: ["b", "d"], 3: ["a", "c"]})

0 commit comments

Comments
 (0)