Cloned undirected graph
This commit is contained in:
@@ -475,3 +475,19 @@ def test_trie_busy():
|
||||
)
|
||||
def test_max_sub_array(nums: list[int], expected: int):
|
||||
assert stuff.sum_max_sub_array(nums) == expected
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("inlist",),
|
||||
[
|
||||
([[2, 3, 4], [1, 7], [1], [1, 5, 6, 8], [4], [4], [2], [4]],),
|
||||
([[2, 4], [1, 3], [2, 4], [1, 3]],),
|
||||
],
|
||||
)
|
||||
def test_copy_neighborly_node(inlist):
|
||||
orig = stuff.neighborly_node_from_list(inlist)
|
||||
copied = stuff.neighborly_node_from_list(stuff.neighborly_node_to_list(orig))
|
||||
|
||||
assert id(orig) != id(copied)
|
||||
assert orig == copied
|
||||
assert stuff.neighborly_node_to_list(orig) == stuff.neighborly_node_to_list(copied)
|
||||
|
||||
Reference in New Issue
Block a user