1
Run and Test
Tirsvad edited this page 2026-11-06 06:08:46 +01:00

English · Dansk · Bahasa Melayu

Run and test

Create and use .venv

python -m venv .venv
python -m pip install --upgrade pip
python -m pip install -e ".[test]"

Activate the environment first: .venv\Scripts\Activate.ps1 on Windows (PowerShell) or source .venv/bin/activate on Linux and macOS. Leave it with deactivate.

Run the game

python server.py

Open http://127.0.0.1:5000/ and then a guess such as http://127.0.0.1:5000/3.

Run the tests

python -m pytest

What we gained

  • A repeatable setup that does not touch the global Python.
  • One command to start the site and one to prove it works.