示例#1
0
	def testShouldBeClose( self ):
		from classes.target import Target
		t1 = Target()
		t2 = Target()
		t1.x = 150
		t1.y = 150
		t2.x = 100
		t2.y = 100
		c = self.Helper.is_close(t1,t2)
		assert c == True, "objects are not close"
示例#2
0
	def testShouldNotBeClose( self ):
		from classes.target import Target
		t1 = Target()
		t2 = Target()
		t1.x = 550
		t1.y = 550
		t2.x = 100
		t2.y = 100
		c = self.Helper.is_close(t1,t2)
		assert c == False, "objects close"
示例#3
0
	def testShouldNotCollide( self ):
		from classes.target import Target
		t1 = Target()
		t2 = Target()
		t1.x = 200
		t1.y = 200
		t2.x = 100
		t2.y = 100
		c = self.Helper.is_collided(t1,t2)
		assert c == False, "collision detected"