Exemplo n.º 1
0
 def test_multiple(self):
   superclasses_of_a_or_b = SuperclassesOf(self.A, self.B)
   self.assertEqual((self.A, self.B), superclasses_of_a_or_b.types)
   self.assertTrue(superclasses_of_a_or_b.satisfied_by(self.A()))
   self.assertTrue(superclasses_of_a_or_b.satisfied_by(self.B()))
   self.assertFalse(superclasses_of_a_or_b.satisfied_by(self.BPrime()))
   self.assertFalse(superclasses_of_a_or_b.satisfied_by(self.C()))
Exemplo n.º 2
0
 def test_multiple(self):
     superclasses_of_a_or_b = SuperclassesOf(self.A, self.B)
     self.assertEqual((self.A, self.B), superclasses_of_a_or_b.types)
     self.assertTrue(superclasses_of_a_or_b.satisfied_by(self.A()))
     self.assertTrue(superclasses_of_a_or_b.satisfied_by(self.B()))
     self.assertFalse(superclasses_of_a_or_b.satisfied_by(self.BPrime()))
     self.assertFalse(superclasses_of_a_or_b.satisfied_by(self.C()))
Exemplo n.º 3
0
 def test_single(self):
   superclasses_of_b = SuperclassesOf(self.B)
   self.assertEqual((self.B,), superclasses_of_b.types)
   self.assertTrue(superclasses_of_b.satisfied_by(self.A()))
   self.assertTrue(superclasses_of_b.satisfied_by(self.B()))
   self.assertFalse(superclasses_of_b.satisfied_by(self.BPrime()))
   self.assertFalse(superclasses_of_b.satisfied_by(self.C()))
Exemplo n.º 4
0
 def test_single(self):
     superclasses_of_b = SuperclassesOf(self.B)
     self.assertEqual((self.B, ), superclasses_of_b.types)
     self.assertTrue(superclasses_of_b.satisfied_by(self.A()))
     self.assertTrue(superclasses_of_b.satisfied_by(self.B()))
     self.assertFalse(superclasses_of_b.satisfied_by(self.BPrime()))
     self.assertFalse(superclasses_of_b.satisfied_by(self.C()))