1
0
Fork 0

Merging upstream version 26.26.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-06-11 08:06:17 +02:00
parent 768f936511
commit 1ac9fca060
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
62 changed files with 938 additions and 453 deletions

View file

@ -201,3 +201,10 @@ x"""
self.assertEqual(len(partial_tokens), 1)
self.assertEqual(partial_tokens[0].token_type, TokenType.VAR)
self.assertEqual(partial_tokens[0].text, "foo")
def test_token_repr(self):
# Ensures both the Python and the Rust tokenizer produce a human-friendly representation
self.assertEqual(
repr(Tokenizer().tokenize("foo")),
"[<Token token_type: TokenType.VAR, text: foo, line: 1, col: 3, start: 0, end: 2, comments: []>]",
)