MCPcopy
hub / github.com/keon/algorithms / test_is_valid_parenthesis

Method test_is_valid_parenthesis

tests/test_stack.py:63–69  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

61 self.assertEqual([8, 3, 9, 17, 1], second_switch_pairs([3, 8, 17, 9, 1]))
62
63 def test_is_valid_parenthesis(self):
64
65 self.assertTrue(is_valid("[]"))
66 self.assertTrue(is_valid("[]()[]"))
67 self.assertFalse(is_valid("[[[]]"))
68 self.assertTrue(is_valid("{([])}"))
69 self.assertFalse(is_valid("(}"))
70
71 def test_simplify_path(self):
72 p = "/my/name/is/..//keon"

Callers

nothing calls this directly

Calls 1

is_validFunction · 0.90

Tested by

no test coverage detected