(self)
| 49 | ) |
| 50 | |
| 51 | def test_switch_pairs(self): |
| 52 | # Test case: even number of values in stack |
| 53 | # bottom [3, 8, 17, 9, 1, 10] top |
| 54 | self.assertEqual([8, 3, 9, 17, 10, 1], first_switch_pairs([3, 8, 17, 9, 1, 10])) |
| 55 | self.assertEqual( |
| 56 | [8, 3, 9, 17, 10, 1], second_switch_pairs([3, 8, 17, 9, 1, 10]) |
| 57 | ) |
| 58 | # Test case: odd number of values in stack |
| 59 | # bottom [3, 8, 17, 9, 1] top |
| 60 | self.assertEqual([8, 3, 9, 17, 1], first_switch_pairs([3, 8, 17, 9, 1])) |
| 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 |
nothing calls this directly
no test coverage detected