summaryrefslogtreecommitdiffstats
path: root/tests/test_tokens.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-12-02 09:16:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-12-02 09:16:29 +0000
commit1a60bbae98d3b530924a6807a55f8250de19ea86 (patch)
tree87d3000f271a6604fff43db188731229aed918a8 /tests/test_tokens.py
parentAdding upstream version 10.0.8. (diff)
downloadsqlglot-1a60bbae98d3b530924a6807a55f8250de19ea86.tar.xz
sqlglot-1a60bbae98d3b530924a6807a55f8250de19ea86.zip
Adding upstream version 10.1.3.upstream/10.1.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/test_tokens.py')
-rw-r--r--tests/test_tokens.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/test_tokens.py b/tests/test_tokens.py
index d4772ba..1d1b966 100644
--- a/tests/test_tokens.py
+++ b/tests/test_tokens.py
@@ -7,13 +7,13 @@ class TestTokens(unittest.TestCase):
def test_comment_attachment(self):
tokenizer = Tokenizer()
sql_comment = [
- ("/*comment*/ foo", "comment"),
- ("/*comment*/ foo --test", "comment"),
- ("--comment\nfoo --test", "comment"),
- ("foo --comment", "comment"),
- ("foo", None),
- ("foo /*comment 1*/ /*comment 2*/", "comment 1"),
+ ("/*comment*/ foo", ["comment"]),
+ ("/*comment*/ foo --test", ["comment", "test"]),
+ ("--comment\nfoo --test", ["comment", "test"]),
+ ("foo --comment", ["comment"]),
+ ("foo", []),
+ ("foo /*comment 1*/ /*comment 2*/", ["comment 1", "comment 2"]),
]
for sql, comment in sql_comment:
- self.assertEqual(tokenizer.tokenize(sql)[0].comment, comment)
+ self.assertEqual(tokenizer.tokenize(sql)[0].comments, comment)