Ejemplo n.º 1
0
 def test_int_int(self):
     self.assertTrue(weak_equals(42, 42))
     self.assertFalse(weak_equals(42, 43))
Ejemplo n.º 2
0
 def test_string_float(self):
     self.assertTrue(weak_equals("1.1", 1.1))
     self.assertTrue(weak_equals(1.1, "1.1"))
     self.assertFalse(weak_equals("2", 1.1))
     self.assertFalse(weak_equals(1.1, "2"))
Ejemplo n.º 3
0
 def test_string_string(self):
     self.assertTrue(weak_equals("a", "a"))
     self.assertFalse(weak_equals("a", "b"))
Ejemplo n.º 4
0
 def test_string_int(self):
     self.assertTrue(weak_equals("1", 1))
     self.assertTrue(weak_equals(1, "1"))
     self.assertFalse(weak_equals("2", 1))
     self.assertFalse(weak_equals(1, "2"))
 def test_string_long(self):
     self.assertTrue(weak_equals("1", int(1)))
     self.assertTrue(weak_equals(int(1), "1"))
     self.assertFalse(weak_equals("2", int(1)))
     self.assertFalse(weak_equals(int(1), "2"))