Add the Player class and the Up key binding
Task: MIL-003#1 Task: MIL-003#2 Task: MIL-003#3
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
"""Shared fixtures. Tests that need a window skip when no display is available."""
|
||||
|
||||
import tkinter
|
||||
import turtle
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def screen() -> turtle.TurtleScreen:
|
||||
"""A single hidden turtle screen shared by the tests that draw."""
|
||||
try:
|
||||
game_screen = turtle.Screen()
|
||||
except tkinter.TclError:
|
||||
pytest.skip("no display available")
|
||||
game_screen.tracer(0)
|
||||
game_screen.getcanvas().winfo_toplevel().withdraw()
|
||||
return game_screen
|
||||
Reference in New Issue
Block a user