Last active
May 21, 2021 05:10
-
-
Save allenabc/1353d0f68708409bce6a87c33cea0781 to your computer and use it in GitHub Desktop.
Code from pycharm.com
This file contains 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 characters
import pytest | |
from Car import Car | |
@pytest.fixture | |
def my_car(): | |
return Car(50) | |
def test_car_accelerate(my_car): | |
my_car.accelerate() | |
assert my_car.speed == 55 | |
def test_car_brake(my_car): | |
my_car.brake() | |
assert my_car.speed == 45 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment