Skip to content

Latest commit

 

History

History
49 lines (33 loc) · 1.29 KB

File metadata and controls

49 lines (33 loc) · 1.29 KB

TDD Practice Repository

This repository is a practice resource for learning Test Driven Development (TDD) principles using the Yatzy game as the implementation example.

About This Project

The Yatzy game serves as the practical foundation for understanding and applying TDD concepts. Through implementing the game's scoring and logic, you'll learn how to write tests first and develop features incrementally.

Dependencies

  • Python 3.x - The programming language used
  • pytest - Testing framework for writing and running tests

Testing Methodology

This project uses pytest for all testing. The development approach follows TDD principles:

  1. Write a test first (Red phase)
  2. Write minimal code to pass the test (Green phase)
  3. Refactor the code for clarity and maintainability (Refactor phase)

Running Tests

To run all tests:

pytest

To run tests with verbose output:

pytest -v

To run tests with coverage report:

pytest --cov=yatzy

Project Structure

  • yatzy/ - Main implementation of the Yatzy game
  • tests/ - Test suite validating the Yatzy implementation

Getting Started

  1. Clone the repository
  2. Install dependencies: pip install pytest
  3. Run the tests: pytest
  4. Explore the code and tests to understand the TDD approach used