mirror of https://github.com/dbcli/pgcli
removing unneeded Nones from output
This commit is contained in:
parent
7992426d07
commit
4f9c130339
|
@ -437,7 +437,11 @@ class PGExecute:
|
|||
|
||||
def handle_notices(n):
|
||||
nonlocal title
|
||||
title = f"{title}{n.message_primary}\n{n.message_detail}\n"
|
||||
title = f"{title}"
|
||||
if n.message_primary:
|
||||
title = f"{title}\n{n.message_primary}"
|
||||
if n.message_detail:
|
||||
title = f"{title}\n{n.message_detail}"
|
||||
|
||||
self.conn.add_notice_handler(handle_notices)
|
||||
|
||||
|
|
|
@ -712,10 +712,7 @@ def test_function_notice_order(executor):
|
|||
result = executor.function_definition("demo_order")
|
||||
|
||||
result = run(executor, "select demo_order()")
|
||||
assert (
|
||||
"first\nNone\nsecond\nNone\nthird\nNone\nfourth\nNone\nfifth\nNone\nsixth\nNone\n"
|
||||
in result[0]
|
||||
)
|
||||
assert "first\nsecond\nthird\nfourth\nfifth\nsixth" in result[0]
|
||||
assert "+------------+" in result[1]
|
||||
assert "| demo_order |" in result[2]
|
||||
assert "|------------|" in result[3]
|
||||
|
|
Loading…
Reference in New Issue