def test_str(self):
snowman = "\u2603"
obj = {'a': [1, 2, snowman]}
j = psycopg2.extensions.adapt(psycopg2.extras.Json(obj))
s = str(j)
self.assertTrue(isinstance(s, str))
# no pesky b's
self.assertTrue(s.startswith("'"))
self.assertTrue(s.endswith("'"))
test_types_extras.py 文件源码
python
阅读 20
收藏 0
点赞 0
评论 0
评论列表
文章目录