コード例 #1
0
    def test_support_Ball_Anything(self):
        for ball, v in self.objects.items():
            if v.get('form') is 'ball':

                for anyObj in self.objects.keys():
                    self.assertFalse(
                        physics.check_physics(('ontop', anyObj, ball),
                                              self.objects))
コード例 #2
0
    def test_support_Smallobjects_LargeObjects(self):
        #for all small objects
        for small, v in self.objects.items():
            if v.get('size') is 'small':

                #test all large objects
                for large, v2 in self.objects.items():
                    if v2.get('size') is 'large':
                        self.assertFalse(
                            physics.check_physics(('ontop', large, small),
                                                  self.objects))
コード例 #3
0
 def test_support_largeBox_smallBox(self):
     self.assertFalse(
         physics.check_physics(('inside', 'lbo', 'lbo'), self.objects))
コード例 #4
0
 def test_support_smallPlank_smallBox(self):
     self.assertFalse(
         physics.check_physics(('inside', 'spl', 'sbo'), self.objects))
コード例 #5
0
 def test_support_smallBox_largePyramid(self):
     self.assertTrue(
         physics.check_physics(('ontop', 'sbo', 'lpy'), self.objects))
コード例 #6
0
 def test_support_smallBox_smallPyramid(self):
     self.assertFalse(
         physics.check_physics(('ontop', 'sbo', 'spy'), self.objects))
コード例 #7
0
 def test_support_smallBox_smallBrick(self):
     self.assertFalse(
         physics.check_physics(('ontop', 'sbo', 'sbr'), self.objects))
コード例 #8
0
 def test_support_LargeBox(self):
     self.assertFalse(
         physics.check_physics(('ontop', 'lbo', 'lpy'), self.objects))