(self)
| 293 | ) |
| 294 | |
| 295 | def test_dialect_aware_diff(self): |
| 296 | from sqlglot.generator import logger |
| 297 | |
| 298 | with self.assertLogs(logger) as cm: |
| 299 | # We want to assert there are no warnings, but the 'assertLogs' method does not support that. |
| 300 | # Therefore, we are adding a dummy warning, and then we will assert it is the only warning. |
| 301 | logger.warning("Dummy warning") |
| 302 | |
| 303 | expression = parse_one("SELECT foo FROM bar FOR UPDATE", dialect="oracle") |
| 304 | self._validate_delta_only( |
| 305 | diff_delta_only(expression, expression.copy(), dialect="oracle"), [] |
| 306 | ) |
| 307 | |
| 308 | self.assertEqual(["WARNING:sqlglot:Dummy warning"], cm.output) |
| 309 | |
| 310 | def test_non_expression_leaf_delta(self): |
| 311 | expr_src = parse_one("SELECT a UNION SELECT b") |
nothing calls this directly
no test coverage detected