Ensure that single ascii characters or single digits are parsed as single characters.
(self)
| 6 | |
| 7 | class TestParseKeys(unittest.TestCase): |
| 8 | def test_single_character(self): |
| 9 | """Ensure that single ascii characters or single digits are parsed as single characters.""" |
| 10 | test_cases = [(key, [key]) for key in string.ascii_letters + string.digits] |
| 11 | for test_key, expected_keys in test_cases: |
| 12 | with self.subTest(f"{test_key} should be parsed as {expected_keys}"): |
| 13 | self.assertEqual(parse_keys(test_key), expected_keys) |
| 14 | |
| 15 | def test_keynames(self): |
| 16 | """Ensure that keynames are parsed to their corresponding mapping. |
nothing calls this directly
no test coverage detected