mirror of
https://github.com/ankitects/anki.git
synced 2025-12-10 21:36:55 -05:00
hide warning when running tests
This commit is contained in:
parent
8efc09d4ef
commit
e005140909
1 changed files with 4 additions and 1 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue