Uniform Range eq tests style

This commit is contained in:
Daniele Varrazzo 2013-06-18 14:10:49 +01:00
parent 28276e3eb1
commit d50ea3d82b

View File

@ -1214,16 +1214,16 @@ class RangeTestCase(unittest.TestCase):
def test_eq_wrong_type(self): def test_eq_wrong_type(self):
from psycopg2.extras import Range from psycopg2.extras import Range
self.assertFalse(Range(10, 20)==()) self.assertNotEqual(Range(10, 20), ())
def test_eq_subclass(self): def test_eq_subclass(self):
from psycopg2.extras import Range, NumericRange from psycopg2.extras import Range, NumericRange
class IntRange(NumericRange): pass class IntRange(NumericRange): pass
class PositiveIntRange(IntRange): pass class PositiveIntRange(IntRange): pass
self.assertTrue(Range(10, 20)==IntRange(10, 20)) self.assertEqual(Range(10, 20), IntRange(10, 20))
self.assertTrue(PositiveIntRange(10, 20)==IntRange(10, 20)) self.assertEqual(PositiveIntRange(10, 20), IntRange(10, 20))
def test_not_ordered(self): def test_not_ordered(self):
from psycopg2.extras import Range from psycopg2.extras import Range