Last active
October 27, 2025 02:36
-
-
Save mcsee/c3ebcb1eb3c135cf3760036de1d29245 to your computer and use it in GitHub Desktop.
Revisions
-
mcsee revised this gist
Oct 27, 2025 . 1 changed file with 18 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,21 +1,35 @@ def test_set_speed(): car = Formula1Car("Red Bull") car.set_speed(320) assert car.speed == 320, ( f"Expected speed to be 320 km/h, " f"but got {car.speed} km/h" ) def test_accelerate(): car = Formula1Car("Red Bull") car.set_speed(320) car.accelerate(10) assert car.speed == 330, ( f"Expected speed to be 330 km/h " f"after accelerating by 10, " f"but got {car.speed} km/h" ) def test_brake(): car = Formula1Car("Red Bull") car.set_speed(330) car.brake(50) assert car.speed == 280, ( f"Expected speed to be 280 km/h " f"after braking by 50, " f"but got {car.speed} km/h" ) def test_change_tire(): car = Formula1Car("Red Bull") car.change_tire("soft") assert car.tire == "soft", ( f"Expected tire type to be 'soft', " f"but got '{car.tire}'" ) -
mcsee created this gist
Oct 26, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ def test_set_speed(): car = Formula1Car("Red Bull") car.set_speed(320) assert car.speed == 320 def test_accelerate(): car = Formula1Car("Red Bull") car.set_speed(320) car.accelerate(10) assert car.speed == 330 def test_brake(): car = Formula1Car("Red Bull") car.set_speed(330) car.brake(50) assert car.speed == 280 def test_change_tire(): car = Formula1Car("Red Bull") car.change_tire("soft") assert car.tire == "soft"