示例#1
0
文件: steps.py 项目: Lucerin/BDD
def when_i_compute_its_figure(step):
    f=Figuras()
   
    if(world.escenario==0):
		world.number = f.cuadrado(world.number)
    elif(world.escenario==1):
		world.number = f.circulo(world.number)
    elif(world.escenario==2):
		world.number = f.rombo(world.number,world.base)
    elif(world.escenario==3):
		world.number = f.triangulo(world.number,world.base)
    else:	
        	world.number = f.rectangulo(world.number,world.base)
示例#2
0
	def test_area_circulo3(self):
		fig=Figuras()
		self.assertEqual(28.2744,fig.circulo(3))
示例#3
0
	def test_usuario13(self):
		self.cal=Figuras()
		self.assertEqual(4, self.cal.rombo(2,4))
示例#4
0
	def test_usuario9(self):
		self.cal=Figuras()
		
		
		self.assertEqual(6, self.cal.cuadrado(2))
示例#5
0
	def test_usuario5(self):
		self.cal=Figuras()

		self.assertEqual(9, self.cal.circulo(2))
示例#6
0
	def test_usuario(self):
		self.cal=Figuras()
		
		self.assertEqual(6, self.cal.circulo(2.45))
示例#7
0
	def test_area_pentagono(self):
		fig=Figuras()
		self.assertEqual(10,fig.pentagono(2,2))
示例#8
0
	def test_area_cuadrado3(self):
		fig=Figuras()
		self.assertEqual(16,fig.cuadrado(4))
示例#9
0
	def test_area_Triang3(self):
		fig = Figuras()
		self.assertEqual(10,fig.areaTriangulo(2,10))
示例#10
0
	def test_area_Triang2(self):
		fig = Figuras()
		self.assertEqual(4.5,fig.areaTriangulo(3.0,3.0))
示例#11
0
	def test_area_Triang1(self):
		fig = Figuras()
		self.assertEqual(10,fig.areaTriangulo(4,5))
示例#12
0
	def test_area_Square3(self):
		fig = Figuras()
		self.assertEqual(12.25,fig.areaCuadrado(3.5,3.5))	
示例#13
0
	def test_area_Square2(self):
		fig = Figuras()
		self.assertEqual(25,fig.areaCuadrado(5.0,5.0))
示例#14
0
	def test_area_Square1(self):
		fig = Figuras()
		self.assertEqual(4,fig.areaCuadrado(2.0,2.0))	
示例#15
0
 def test_cuadrado_5_5(self):
     fig = Figuras()
     self.assertEqual(25, fig.cuadrado(5, 5))
示例#16
0
	def test_area_rectangulo(self):
		fig=Figuras()
		self.assertEqual(8,fig.rectangulo(2,4))
示例#17
0
	def test_area_rectangulo5_6(self):
		fig=Figuras()
		self.assertEqual(30,fig.rectangulo(5,6))
示例#18
0
	def test_area_Circle1(self):
		fig = Figuras()
		self.assertEqual(50.2656,fig.areaCirculo(4.0))
示例#19
0
	def test_area_triangulo5(self):
		fig=Figuras()
		self.assertEqual(5,fig.triangulo(2,5))
示例#20
0
	def test_area_Circle1(self):
		fig = Figuras()
		self.assertEqual(28.2744,fig.areaCirculo(3.0))
示例#21
0
	def test_area_circulo(self):
		fig=Figuras()
		self.assertEqual(12.5664,fig.circulo(2))
示例#22
0
	def test_area_Circle1(self):
		fig = Figuras()
		self.assertEqual(113.0976,fig.areaCirculo(6.0))
示例#23
0
class TestCase(unittest.TestCase):
	def test_usuario(self):
		self.cal=Figuras()
		self.assertEqual(4, self.cal.cuadrado(2))
	
	
	
	def test_usuario(self):
		self.cal=Figuras()
		
		self.assertEqual(6, self.cal.circulo(2.45))
		
	def test_usuario1(self):
		self.cal=Figuras()
		
		self.assertEqual(2, self.cal.rectangulo(2,1))
	
		
	def test_usuario2(self):
		self.cal=Figuras()

		self.assertEqual(5, self.cal.triangulo(2,5))
	def test_usuario3(self):
		self.cal=Figuras()

		self.assertEqual(12, self.cal.rombo(2,8))
		
	def test_usuario4(self):
		self.cal=Figuras()
	
		
		self.assertEqual(25, self.cal.cuadrado(5))
	
	def test_usuario5(self):
		self.cal=Figuras()

		self.assertEqual(9, self.cal.circulo(2))

	def test_usuario6(self):
		self.cal=Figuras()
		
		self.assertEqual(14, self.cal.rectangulo(2,7))
		
	
		
	def test_usuario7(self):
		self.cal=Figuras()
		
		self.assertEqual(4, self.cal.triangulo(2,3))
		
	def test_usuario8(self):
		self.cal=Figuras()
		
		self.assertEqual(8, self.cal.rombo(2,8))
		
		
	def test_usuario9(self):
		self.cal=Figuras()
		
		
		self.assertEqual(6, self.cal.cuadrado(2))
		
	def test_usuario10(self):
		self.cal=Figuras()
		
		self.assertEqual(13, self.cal.circulo(6))
		
	
	def test_usuario11(self):
		self.cal=Figuras()
	
		self.assertEqual(4, self.cal.rectangulo(2,2))

	def test_usuario12(self):
		self.cal=Figuras()
		
		self.assertEqual(8, self.cal.triangulo(2,8))
		
	def test_usuario13(self):
		self.cal=Figuras()
		self.assertEqual(4, self.cal.rombo(2,4))
示例#24
0
	def test_area_Recta1(self):
		fig = Figuras()
		self.assertEqual(12, fig.areaRectangulo(3,4))
示例#25
0
	def test_usuario7(self):
		self.cal=Figuras()
		
		self.assertEqual(4, self.cal.triangulo(2,3))
示例#26
0
	def test_area_Recta2(self):
		fig = Figuras()
		self.assertEqual(35, fig.areaRectangulo(5,7))
示例#27
0
	def test_usuario11(self):
		self.cal=Figuras()
	
		self.assertEqual(4, self.cal.rectangulo(2,2))
示例#28
0
	def test_area_Recta3(self):
		fig = Figuras()
		self.assertEqual(32, fig.areaRectangulo(4,8))
示例#29
0
 def test_cuadrado_2_2(self):
     fig = Figuras()
     self.assertEqual(4, fig.cuadrado(2, 2))
示例#30
0
	def test_area_Rombo1(self):
		fig = Figuras()
		self.assertEqual(12.5,fig.areaRombo(5.0,5.0))
示例#31
0
	def test_area_circulo4(self):
		fig=Figuras()
		self.assertEqual(50.2656,fig.circulo(4))
示例#32
0
	def test_area_Rombo2(self):
		fig = Figuras()
		self.assertEqual(9.0,fig.areaRombo(6.0,3.0))
示例#33
0
	def test_area_rectangulo_3_6(self):
		fig=Figuras()
		self.assertEqual(18,fig.rectangulo(3,6))
示例#34
0
	def test_area_Rombo3(self):
		fig = Figuras()
		self.assertEqual(25,fig.areaRombo(5,10))
示例#35
0
	def test_area_cuadrado(self):
		fig=Figuras()
		self.assertEqual(4,fig.cuadrado(2))
示例#36
0
	def test_validar_figuras(self):
		fig = Figuras()
		fig.areaRectangulo(3,4)
		self.assertEqual("rectangulo", fig.probarFigura())
示例#37
0
	def test_area_triangulo(self):
		fig=Figuras()
		self.assertEqual(3,fig.triangulo(2,3))
示例#38
0
    def test_usuario(self):
        self.cal = Figuras()

        self.assertEqual(6, self.cal.circulo(2.45))
示例#39
0
	def test_area_triangulo7(self):
		fig=Figuras()
		self.assertEqual(7,fig.triangulo(2,7))
示例#40
0
    def test_usuario1(self):
        self.cal = Figuras()

        self.assertEqual(2, self.cal.rectangulo(2, 1))
示例#41
0
	def test_area_pentagono4(self):
		fig=Figuras()
		self.assertEqual(20,fig.pentagono(2,4))
示例#42
0
    def test_usuario2(self):
        self.cal = Figuras()

        self.assertEqual(5, self.cal.triangulo(2, 5))
示例#43
0
	def test_area_pentagono7(self):
		fig=Figuras()
		self.assertEqual(70,fig.pentagono(7,4))
示例#44
0
    def test_usuario4(self):
        self.cal = Figuras()

        self.assertEqual(25, self.cal.cuadrado(5))
示例#45
0
	def test_usuario2(self):
		self.cal=Figuras()

		self.assertEqual(5, self.cal.triangulo(2,5))
示例#46
0
    def test_usuario5(self):
        self.cal = Figuras()

        self.assertEqual(9, self.cal.circulo(2))
示例#47
0
	def test_usuario4(self):
		self.cal=Figuras()
	
		
		self.assertEqual(25, self.cal.cuadrado(5))
示例#48
0
    def test_usuario6(self):
        self.cal = Figuras()

        self.assertEqual(14, self.cal.rectangulo(2, 7))
示例#49
0
	def test_usuario6(self):
		self.cal=Figuras()
		
		self.assertEqual(14, self.cal.rectangulo(2,7))
示例#50
0
    def test_usuario7(self):
        self.cal = Figuras()

        self.assertEqual(4, self.cal.triangulo(2, 3))
示例#51
0
	def test_usuario8(self):
		self.cal=Figuras()
		
		self.assertEqual(8, self.cal.rombo(2,8))
示例#52
0
class TestCase(unittest.TestCase):
    def test_usuario(self):
        self.cal = Figuras()
        self.assertEqual(4, self.cal.cuadrado(2))

    def test_usuario(self):
        self.cal = Figuras()

        self.assertEqual(6, self.cal.circulo(2.45))

    def test_usuario1(self):
        self.cal = Figuras()

        self.assertEqual(2, self.cal.rectangulo(2, 1))

    def test_usuario2(self):
        self.cal = Figuras()

        self.assertEqual(5, self.cal.triangulo(2, 5))

    def test_usuario3(self):
        self.cal = Figuras()

        self.assertEqual(12, self.cal.rombo(2, 8))

    def test_usuario4(self):
        self.cal = Figuras()

        self.assertEqual(25, self.cal.cuadrado(5))

    def test_usuario5(self):
        self.cal = Figuras()

        self.assertEqual(9, self.cal.circulo(2))

    def test_usuario6(self):
        self.cal = Figuras()

        self.assertEqual(14, self.cal.rectangulo(2, 7))

    def test_usuario7(self):
        self.cal = Figuras()

        self.assertEqual(4, self.cal.triangulo(2, 3))

    def test_usuario8(self):
        self.cal = Figuras()

        self.assertEqual(8, self.cal.rombo(2, 8))

    def test_usuario9(self):
        self.cal = Figuras()

        self.assertEqual(6, self.cal.cuadrado(2))

    def test_usuario10(self):
        self.cal = Figuras()

        self.assertEqual(13, self.cal.circulo(6))

    def test_usuario11(self):
        self.cal = Figuras()

        self.assertEqual(4, self.cal.rectangulo(2, 2))

    def test_usuario12(self):
        self.cal = Figuras()

        self.assertEqual(8, self.cal.triangulo(2, 8))

    def test_usuario13(self):
        self.cal = Figuras()
        self.assertEqual(4, self.cal.rombo(2, 4))
示例#53
0
	def test_usuario10(self):
		self.cal=Figuras()
		
		self.assertEqual(13, self.cal.circulo(6))
示例#54
0
    def test_usuario8(self):
        self.cal = Figuras()

        self.assertEqual(8, self.cal.rombo(2, 8))
示例#55
0
	def test_usuario12(self):
		self.cal=Figuras()
		
		self.assertEqual(8, self.cal.triangulo(2,8))
示例#56
0
 def test_usuario(self):
     self.cal = Figuras()
     self.assertEqual(4, self.cal.cuadrado(2))
示例#57
0
    def test_usuario10(self):
        self.cal = Figuras()

        self.assertEqual(13, self.cal.circulo(6))
示例#58
0
 def test_elipse_9_1(self):
     fig = Figuras()
     self.assertEqual(28.2744, fig.elipse(9, 1))