PyCatan-AI / tests /README.md
EZTIME2025
organise the project
69373e6

PyCatan Tests

This directory contains all test files for the PyCatan project, organized by test type.

Directory Structure

๐Ÿ“ฆ unit/

Unit Tests - Testing individual modules and components in isolation.

Files: test_actions.py, test_board.py, test_game.py, etc.

Run with: pytest tests/unit/

๐Ÿ”— integration/

Integration Tests - Testing complete game scenarios and interactions between components.

Includes comprehensive tests for:

  • Knight card functionality
  • City building mechanics
  • Robber interactions
  • Trade systems
  • Game flow scenarios

Files: test_knight_*.py, test_city_building.py, etc.

Run with: pytest tests/integration/

๐ŸŽฎ manual/

Manual Tests - Tests requiring user interaction or visual verification.

Currently empty - reserved for interactive tests.

Running Tests

# Run all tests
pytest tests/

# Run only unit tests
pytest tests/unit/

# Run only integration tests
pytest tests/integration/

# Run specific test file
pytest tests/integration/test_knight_card.py

# Run with verbose output
pytest tests/ -v

Test Coverage

The tests cover:

  • Core game logic (Game, Player, Board)
  • Building mechanics (settlements, cities, roads)
  • Card systems (resource cards, development cards)
  • Game flow (turns, dice rolling, robber)
  • User interactions (HumanUser, GameManager)
  • Visualizations (Console, Web)