def test_car_name_whitespace_negative(self, mass, density, radius):
     name_not_alnum = 'Tesla-Roadster'
     with pytest.raises(NameError):
         Car(name_not_alnum, mass, density,[], radius)
 def test_tesla_popltn1(self):
     tesla = Car('Roadster', 2,3,[], 6)
     tesla.send_peeps_here(1)
     assert tesla.population == 1
 def test_car_name_positive(self, name_expected, mass, density, radius):
     #name_expected = 'Roadster'
     tesla = Car(name_expected, mass, density,[], radius)
     assert tesla.name == name_expected
 def test_tesla_popltn2(self):
     tesla = Car('Roadster', 2,3,[], 6)
     tesla.send_peeps_here(2)
     assert tesla.population == 2, 'Wrong population!!!111'
 def test_car_name_whitespace_negative(self, mass):
     name_not_alnum = 'Tesls-Roadster'
     with pytest.raises(NameError):
         Car(name_not_alnum, mass, 3, [], 6)
 def test_car_name_positive(self, name_expected, mass):
     #name_expected = 'Roadster'
     tesla = Car(name_expected, mass, 3, [], 6)
     assert tesla.name == name_expected
Example #7
0
 def test_car_name_positive(self, name_expected, mass, density, radius):
     tesla = Car(name_expected, mass, density, [], radius)
     assert car.name == name_expected