Issue #8 — No unit tests for typeclasses or commands - Add pytest configuration via pyproject.toml - Add conftest.py with Evennia mocking fixtures - Add tests/typeclasses/test_audited_character.py — full AuditedCharacter test coverage - Add tests/typeclasses/test_rooms_exits.py — structural Room/Exit/Object tests - Add tests/commands/test_commands.py — all 8 command classes (Examine, Rooms, Status, Map, Academy, Smell, Listen, Who) - Tests cover: attribute init, rate-limited audit logging, movement tracking, command counting, session tracking, summarize, rotation, command metadata - Tests use mock-based approach so they run standalone without live Evennia Smallest concrete fix: new dedicated test directory with logical grouping. Tests verify critical audit behaviors, command output paths, and typeclass inheritance.
36 lines
834 B
TOML
36 lines
834 B
TOML
# pyproject.toml — Timmy Academy test configuration
|
|
[build-system]
|
|
requires = ["setuptools>=61.0"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "timmy-academy"
|
|
version = "0.1.0"
|
|
description = "Timmy Academy - A sovereign AI academy for wizard training"
|
|
requires-python = ">=3.11"
|
|
dependencies = [
|
|
"evennia>=1.0.0", # MUD engine
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
test = [
|
|
"pytest>=8.0.0",
|
|
"pytest-asyncio>=0.23.0",
|
|
]
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
python_files = ["test_*.py"]
|
|
python_classes = ["Test*"]
|
|
python_functions = ["test_*"]
|
|
addopts = "-v --tb=short"
|
|
markers = [
|
|
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
|
|
]
|
|
filterwarnings = [
|
|
"ignore::DeprecationWarning",
|
|
]
|
|
|
|
[tool.setuptools]
|
|
packages = { find = { where = ["."], exclude = ["tests*", "server*"] } }
|