Exemplo n.º 1
0
 def test_set_and_get_speed(self):
     print("car set/get speed integration test. ")
     test = Car("red")
     if Test_fordPinto.test_set_speed(self):
         if Test_fordPinto.test_get_speed(self):
             if self.assertEqual(test.get_speed(), 110):
                 return
Exemplo n.º 2
0
 def test_info(self):
     print("car test_info test. ")
     test = Car("red")
     if self.assertIsNotNone(test.info()):
         return
Exemplo n.º 3
0
 def test_get_engine(self):
     print("car get_engine test. ")
     test = Car("red")
     if self.assertEqual(test.get_engine(), 1):
         return
Exemplo n.º 4
0
 def test_set_speed(self):
     print("car set_speed test. ")
     test = Car("red")
     if self.assertTrue(test.set_speed()):
         return
Exemplo n.º 5
0
 def test_get_speed(self):
     print("car get_speed test. ")
     test = Car("red")
     if self.assertIsNotNone(test.get_speed()):
         return
Exemplo n.º 6
0
 def test_owner(self):
     print("car test_owner test. ")
     test = Car("red")
     if self.assertEqual(test.owner(), "Wayne"):
         return
Exemplo n.º 7
0
 def test_get_wheel_amount(self):
     print("car get_wheel_amount test. ")
     test = Car("red")
     if self.assertEqual(test.get_wheel_amount(), 4):
         return
Exemplo n.º 8
0
                    "street", "Street", "STREET"
            ] and checker == 0:
                checker2 = 1
            else:
                bikeType = input(
                    "That is not an option. Please input one of the three choices: BMX, Mountain, or Street "
                )
        while bikeType in [
                "Bmx", "BMX", "bmx", "mountain", "Mountain", "MOUNTAIN",
                "street", "Street", "STREET"
        ] and checker3 == 0:
            color = input("I see. What color is your " + bikeType + " bike? ")
            print("Understood. Here is some info about your bike class: ")

            garthBike = Bike(color, bikeType)
            garthBike.info()
            checker3 = 1
            checker = 1

    elif user in ["Wayne", "wayne", "WAYNE"]:
        # Create Wayne's car
        carColor = input(
            "Hi Wayne! I understand you don't have the finances for many options, so you only have a Ford Pinto. What "
            "color is it? ")
        wayneCar = Car(carColor)
        wayneCar.info()
        checker = 1

    else:
        print("Sorry! This is only for Garth or Wayne.")