def testByteaHexCheckFalsePositive(self):
# the check \x -> x to detect bad bytea decode
# may be fooled if the first char is really an 'x'
o1 = psycopg2.Binary(b'x')
o2 = self.execute("SELECT %s::bytea AS foo", (o1,))
self.assertEqual(b'x', o2[0])
test_types_basic.py 文件源码
python
阅读 45
收藏 0
点赞 0
评论 0
评论列表
文章目录