(candidate)
| 202 | |
| 203 | def test_eat_identifier(self): |
| 204 | def is_valid_id(candidate): |
| 205 | result = HyperParser._eat_identifier(candidate, 0, len(candidate)) |
| 206 | if result == len(candidate): |
| 207 | return True |
| 208 | elif result == 0: |
| 209 | return False |
| 210 | else: |
| 211 | err_msg = "Unexpected result: {} (expected 0 or {}".format( |
| 212 | result, len(candidate) |
| 213 | ) |
| 214 | raise Exception(err_msg) |
| 215 | |
| 216 | # invalid first character which is valid elsewhere in an identifier |
| 217 | self.assertFalse(is_valid_id('2notid')) |
nothing calls this directly
no test coverage detected