MCPcopy
hub / github.com/dbcli/pgcli / test_function_notice_order

Function test_function_notice_order

tests/test_pgexecute.py:677–705  ·  view source on GitHub ↗
(executor)

Source from the content-addressed store, hash-verified

675
676@dbtest
677def test_function_notice_order(executor):
678 run(
679 executor,
680 """
681 CREATE OR REPLACE FUNCTION demo_order() RETURNS VOID AS
682 $$
683 BEGIN
684 RAISE NOTICE 'first';
685 RAISE NOTICE 'second';
686 RAISE NOTICE 'third';
687 RAISE NOTICE 'fourth';
688 RAISE NOTICE 'fifth';
689 RAISE NOTICE 'sixth';
690 END;
691 $$
692 LANGUAGE plpgsql;
693 """,
694 )
695
696 executor.function_definition("demo_order")
697
698 result = run(executor, "select demo_order()")
699 assert "first\nsecond\nthird\nfourth\nfifth\nsixth" in result[0]
700 assert "+------------+" in result[1]
701 assert "| demo_order |" in result[2]
702 assert "|------------|" in result[3]
703 assert "| |" in result[4]
704 assert "+------------+" in result[5]
705 assert "SELECT 1" in result[6]
706
707
708@dbtest

Callers

nothing calls this directly

Calls 2

runFunction · 0.90
function_definitionMethod · 0.80

Tested by

no test coverage detected