Skip to content

Commit

Permalink
Minor tests coverage tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
lelit committed Dec 20, 2024
1 parent b329068 commit a4d9d58
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pglast/printers/dml.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def AEXPR_SIMILAR(self, node, output):
output.swrites('NOT')
output.swrite('SIMILAR TO ')
if ((not isinstance(node.rexpr, ast.FuncCall)
or node.rexpr.funcname[1].sval != 'similar_to_escape')):
or node.rexpr.funcname[1].sval != 'similar_to_escape')): # pragma: no cover
raise RuntimeError('Expected a FuncCall to "similar_to_escape", got %r',
node.rexpr)
pattern = node.rexpr.args[0]
Expand Down
2 changes: 2 additions & 0 deletions tests/test_printers_roundtrip/ddl/alter_table.sql
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,5 @@ ALTER TABLE ALL IN TABLESPACE foo OWNED BY me SET TABLESPACE bar NOWAIT
ALTER TABLE table_name ENABLE TRIGGER ALL

ALTER TABLE sch3ma.t1 ALTER COLUMN c1 ADD GENERATED BY DEFAULT AS IDENTITY ( SEQUENCE NAME sch3ma.t1 START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1 )

ALTER TABLE t1 ALTER COLUMN c1 SET GENERATED ALWAYS

0 comments on commit a4d9d58

Please sign in to comment.