We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e862c3b commit dc94ae0Copy full SHA for dc94ae0
1 file changed
Sprint-2/implement_linked_list/linked_list_test.py
@@ -34,6 +34,20 @@ def test_remove_tail(self):
34
self.assertIsNone(b.next)
35
self.assertIsNone(b.previous)
36
37
+ def test_remove_middle(self):
38
+ l = LinkedList()
39
+ l.push_head("a")
40
+ b = l.push_head("b")
41
+ l.push_head("c")
42
+
43
+ l.remove(b)
44
45
+ self.assertIsNone(b.next)
46
+ self.assertIsNone(b.previous)
47
48
+ self.assertEqual(l.pop_tail(), "a")
49
+ self.assertEqual(l.pop_tail(), "c")
50
51
52
if __name__ == "__main__":
53
unittest.main()
0 commit comments