hide warning when running tests

This commit is contained in:
Damien Elmes 2020-04-06 20:24:05 +10:00
parent 8efc09d4ef
commit e005140909

View file

@ -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()