From e0051409090cabd0f0601dfbe5198499533a2df6 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 6 Apr 2020 20:24:05 +1000 Subject: [PATCH] hide warning when running tests --- pylib/tests/test_collection.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pylib/tests/test_collection.py b/pylib/tests/test_collection.py index ab867225a..cd47fced8 100644 --- a/pylib/tests/test_collection.py +++ b/pylib/tests/test_collection.py @@ -164,7 +164,7 @@ def test_translate(): assert no_uni(d.tr(TR.STATISTICS_REVIEWS, reviews=2)) == "2 reviews" -def test_db_named_args(): +def test_db_named_args(capsys): sql = "select a, 2+:test5 from b where arg =:foo and x = :test5" args = [] kwargs = dict(test5=5, foo="blah") @@ -172,3 +172,6 @@ def test_db_named_args(): s, a = emulate_named_args(sql, args, kwargs) assert s == "select a, 2+?1 from b where arg =?2 and x = ?1" assert a == [5, "blah"] + + # swallow the warning + _ = capsys.readouterr()