Skip to content

Commit 933a69e

Browse files
dpageclaude
andcommitted
Fix SQL extraction test expected values after rstrip(';') change.
The rstrip(';') applied to each block before joining means single blocks and the last block in multi-block joins no longer have trailing semicolons. Update expected values to match. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 5470e94 commit 933a69e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

web/pgadmin/tools/sqleditor/tests/test_nlq_chat.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ class NLQSqlExtractionTestCase(BaseTestGenerator):
214214
'```sql\nSELECT * FROM users;\n```\n\n'
215215
'This returns all users.'
216216
),
217-
expected_sql='SELECT * FROM users;'
217+
expected_sql='SELECT * FROM users'
218218
)),
219219
('SQL Extraction - Multiple SQL blocks', dict(
220220
response_text=(
@@ -227,11 +227,11 @@ class NLQSqlExtractionTestCase(BaseTestGenerator):
227227
)),
228228
('SQL Extraction - pgsql language tag', dict(
229229
response_text='```pgsql\nSELECT 1;\n```',
230-
expected_sql='SELECT 1;'
230+
expected_sql='SELECT 1'
231231
)),
232232
('SQL Extraction - postgresql language tag', dict(
233233
response_text='```postgresql\nSELECT 1;\n```',
234-
expected_sql='SELECT 1;'
234+
expected_sql='SELECT 1'
235235
)),
236236
('SQL Extraction - No SQL blocks', dict(
237237
response_text=(
@@ -264,7 +264,7 @@ class NLQSqlExtractionTestCase(BaseTestGenerator):
264264
'SELECT u.name, o.total\n'
265265
'FROM users u\n'
266266
'JOIN orders o ON u.id = o.user_id\n'
267-
'WHERE o.total > 100;'
267+
'WHERE o.total > 100'
268268
)
269269
)),
270270
]

0 commit comments

Comments
 (0)