def test_eq_subclass(self):
from psycopg2.extras import Range, NumericRange
class IntRange(NumericRange):
pass
class PositiveIntRange(IntRange):
pass
self.assertEqual(Range(10, 20), IntRange(10, 20))
self.assertEqual(PositiveIntRange(10, 20), IntRange(10, 20))
# as the postgres docs describe for the server-side stuff,
# ordering is rather arbitrary, but will remain stable
# and consistent.
评论列表
文章目录