Fix food spawn test and optimize test execution

This commit is contained in:
Rbanh committed 2025-02-23 12:25:28 -05:00
1 parent cb626dfe7d
commit fcab6ec766
4 files changed
+20 -16

No files matched your search

+5 -4
View File
@@ -6,11 +6,12 @@ import os
# Add src directory to Python path
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
@pytest.fixture(autouse=True)
def pygame_init():
"""Initialize pygame for all tests"""
def pytest_configure(config):
"""Initialize pygame once before any tests run"""
pygame.init()
yield
def pytest_unconfigure(config):
"""Clean up pygame after all tests are done"""
pygame.quit()
@pytest.fixture