Skip to content

Instantly share code, notes, and snippets.

@allenabc
Last active May 21, 2021 05:10
Show Gist options
  • Save allenabc/1353d0f68708409bce6a87c33cea0781 to your computer and use it in GitHub Desktop.
Save allenabc/1353d0f68708409bce6a87c33cea0781 to your computer and use it in GitHub Desktop.
Code from pycharm.com
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