def testEqSameArgs(self): # Test using '==' operator on two EqConnectionPool instances with # same arguments pool1 = mtrlogobserver.EqConnectionPool("MySQLdb", "host", "buildbot", "password", "db", extra="dummy") pool2 = mtrlogobserver.EqConnectionPool("MySQLdb", "host", "buildbot", "password", "db", extra="dummy") self.assertTrue(pool1 == pool2)
def testEqSameInstance(self): # Test using '==' operator on same EqConnectionPool instance pool = mtrlogobserver.EqConnectionPool("MySQLdb", "host", "buildbot", "password", "db") self.assertTrue(pool == pool)
def testNeDiffType(self): # Test using '!=' operator on an EqConnectionPool instance and object # of different type pool = mtrlogobserver.EqConnectionPool("DummyDb1") self.assertTrue(pool != object())
def testNeDiffArgs(self): # Test using '!=' operator on two EqConnectionPool instances with # different arguments pool1 = mtrlogobserver.EqConnectionPool("DummyDb1") pool2 = mtrlogobserver.EqConnectionPool("DummyDb2") self.assertTrue(pool1 != pool2)
def testNeSameArgs(self): # Test using '!=' operator on two EqConnectionPool instances with same # arguments pool1 = mtrlogobserver.EqConnectionPool("DummyDb1", "x", y="z") pool2 = mtrlogobserver.EqConnectionPool("DummyDb1", "x", y="z") self.assertFalse(pool1 != pool2)
def testNeSameInstance(self): # Test using '!=' operator on same EqConnectionPool instance pool = mtrlogobserver.EqConnectionPool("DummyDb1") self.assertFalse(pool != pool)