tests
1 changed files with 11 additions and 0 deletions
test_solutions.py ADDED
View File
| @@ -0,0 +1,11 @@ | ||
| 1 | +from two_sum import two_sum | |
| 2 | +from valid_parentheses import is_valid | |
| 3 | + | |
| 4 | + | |
| 5 | +def test_two_sum(): | |
| 6 | + assert two_sum([2, 7, 11, 15], 9) == [0, 1] | |
| 7 | + | |
| 8 | + | |
| 9 | +def test_valid(): | |
| 10 | + assert is_valid("()[]{}") | |
| 11 | + assert not is_valid("(]") | |