Spaces:
Running
Running
| import unittest | |
| from dataset.problem_12.buggy import parse_pairs | |
| class TestParsePairs(unittest.TestCase): | |
| def test_simple(self): | |
| self.assertEqual(parse_pairs("a=1,b=2"), {"a": 1, "b": 2}) | |
| def test_spaces(self): | |
| self.assertEqual(parse_pairs("x = 10, y = 20"), {"x": 10, "y": 20}) | |
| if __name__ == "__main__": | |
| unittest.main() | |