def test_eval_kwargs():
with pytest.warns(RuntimeWarning):
v = eval('debug.format(1, apple="pear")')
assert set(str(v).split('\n')) == {
"<string>:1 <module>",
" 1 (int)",
" apple: 'pear' (str) len=4",
}
评论列表
文章目录