Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified docs/station-fall.apk
Binary file not shown.
Binary file modified docs/station-fall.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async def run_game(win, screen_width, screen_height, background, truck_img, sett
# music set to dead
pygame.mixer.music.stop()
music_volume = pygame.mixer.music.get_volume()
pygame.mixer.music.load('sound/uncomfortable-panels.ogg')
pygame.mixer.music.load(resolve_asset_path("sound/uncomfortable-panels.ogg"))
pygame.mixer.music.set_volume(music_volume)
pygame.mixer.music.play(-1)

Expand Down
2 changes: 1 addition & 1 deletion src/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def draw_credits(win, screen_width, screen_height, background, float_time, menu_
("Meheraj Khatri", "| Developer | UI & Mechanics Integration | QA Lead |"),
("Loy Ngo", "| Developer | Navigation System (Minimap) | UI/Menu Systems |"),
("Rowan Ess", "| Developer | Music |"),
("Sebastian Bentancourt","| Developer |"),
("Sebastian Betancourt","| Developer | Web Deployment | Build Pipeline |"),
("Yusairah Haque", "| Developer |"),
("Zachary Evans", "| Developer |"),
]
Expand Down
43 changes: 43 additions & 0 deletions src/test_cases/test_deployment.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import unittest
from pathlib import Path
import re

class TestDeployment(unittest.TestCase):

def test_no_sys_exit_in_game(self):
source = Path("src/game.py").read_text()
self.assertNotIn("sys.exit()", source)

def test_no_bare_asyncio_imports(self):
for path in Path("src").glob("*.py"):
source = path.read_text()
self.assertNotIn("from asyncio import", source,
f"Illegal asyncio import in {path.name}")

def test_resolve_asset_path_used_for_sounds(self):
source = Path("src/game.py").read_text()
calls = re.findall(r'pygame\.mixer\.Sound\((.*?)\)', source)
for call in calls:
self.assertIn("resolve_asset_path", call,
f"Sound loaded without resolve_asset_path: {call}")

def test_docs_index_has_hidpi_fix(self):
index_path = Path("docs/index.html")
if not index_path.exists():
self.skipTest("docs/index.html not built yet")
self.assertIn("fixCanvas", index_path.read_text())

def test_docs_index_no_pythonrc(self):
index_path = Path("docs/index.html")
if not index_path.exists():
self.skipTest("docs/index.html not built yet")
self.assertNotIn("pythonrc.py", index_path.read_text())

def test_docs_index_no_100_percent_canvas(self):
index_path = Path("docs/index.html")
if not index_path.exists():
self.skipTest("docs/index.html not built yet")
self.assertNotIn("width: 100%", index_path.read_text())

if __name__ == "__main__":
unittest.main()
Loading