Spaces:
Running
Running
File size: 369 Bytes
03a907a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 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()
|